Summary
Online Reviewer System 1.0 contains a SQL injection vulnerability in the studentresult-view.php script, where the test_id parameter is incorporated into database queries without proper sanitization.
A remote attacker can exploit this flaw by sending crafted requests to manipulate backend SQL queries, potentially exposing or altering assessment data whenever the vulnerable page is accessed with untrusted input.
Affected context
The vulnerability exists in the Online Reviewer System 1.0 within the student assessment results functionality located at /system/system/students/assessments/results/studentresult-view.php.
It typically manifests when user-controlled input from the test_id request parameter is used to build SQL queries directly, without adequate parameterization or neutralization.
Any deployment that exposes this script to untrusted users (such as students or external users) and uses a relational database backend is potentially affected.
Exploit preconditions
- Attack surface: HTTP(S) interface to the Online Reviewer System, specifically requests targeting
studentresult-view.php. - Required access: Network access to the web application; no prior authentication may be required depending on how the results page is exposed.
- Trigger point: Supplying a crafted
test_idvalue in query parameters or form data that the script passes into a SQL statement. - Why exploitation is possible: The application appears to concatenate the
test_idvalue directly into SQL commands without using bound parameters or robust input neutralization, allowing attackers to inject additional SQL syntax.
Why this happens
The core issue is the construction of SQL statements by directly embedding user-supplied data from the test_id parameter into query strings.
This pattern aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where control characters such as quotes, operators, and comment delimiters are not neutralized before being processed by the database engine.
The presence of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component reflects a broader design flaw where untrusted input is forwarded to a downstream interpreter (the SQL engine) without enforcing a strict separation between data and command.
Potential impact
- Attackers may read or enumerate sensitive assessment records and student result data that they are not authorized to see.
- Database contents related to tests, scores, and user information could be modified, corrupted, or deleted.
- Authentication or authorization checks that rely on database data may be bypassed or weakened.
- The database account used by the application could be abused for broader database reconnaissance and manipulation, subject to its privileges.
- In some configurations, attackers could chain this into further compromise (e.g., writing files or executing database-native functions, depending on DBMS and permissions).
General mitigation guidance
Effective mitigation usually focuses on eliminating direct concatenation of untrusted data into SQL and tightening data handling paths:
- Use parameterized queries (prepared statements with bound parameters) for all database operations that consume
test_idand other user-controlled values. - Enforce strict typing and validation: treat
test_idas a numeric identifier and reject or normalize any input that does not conform to the expected format and range. - Apply centralized input handling, where database-facing code receives already-validated, well-typed values rather than raw HTTP parameters.
- Restrict database privileges so the application account has only the minimal permissions required (e.g., no schema modification or superuser capabilities).
- Introduce a secure-by-default data access layer or ORM that discourages ad hoc query string construction.
How teams detect issues like this
Organizations can detect and monitor for this type of vulnerability using several approaches:
- Static analysis: Configure SAST tools or linters to flag dynamic SQL construction that interpolates request parameters or other user-controlled data into query strings.
- Code review: During manual review, look for direct use of
$_GET,$_POST, or similar variables in SQL queries, especially in scripts likestudentresult-view.phpthat handle IDs and filters. - Dynamic testing: Employ DAST tools or security scanners that attempt SQL injection payloads on parameters such as
test_idand monitor for database error messages or anomalous responses. - Runtime monitoring: Use web application firewalls (WAFs) or query-level logging to detect suspicious query patterns, such as unexpected operators, comments, or tautologies in incoming SQL.

