Summary
Online Reviewer System 1.0 contains a SQL injection vulnerability in the exam-update functionality where the test_id parameter is used unsafely in database queries.
A remote attacker can send crafted requests to manipulate backend SQL, which may lead to data exposure, modification, or other unauthorized database operations.
Affected context
The vulnerability occurs in the Online Reviewer System 1.0 within the admin assessments pretest update endpoint:
- File: /system/system/admins/assessments/pretest/exam-update.php
- Parameter: test_id
The issue manifests when user-controlled input from HTTP requests is incorporated into SQL statements without robust validation, encoding, or parameterization.
It primarily affects deployments where this endpoint is reachable over the network and the application connects to a relational database backend.
Exploit preconditions
- Attack surface: HTTP(S) interface exposing /system/system/admins/assessments/pretest/exam-update.php
- Required access: Ability to send requests to the application (authentication requirements depend on deployment configuration)
- Trigger point: Submission of a crafted test_id parameter that is passed into SQL queries
- Why exploitation is possible: The test_id value is concatenated or interpolated into SQL statements without using parameterized queries or proper neutralization, allowing injected SQL to be executed by the database.
Why this happens
This vulnerability stems from constructing SQL queries using unsanitized, user-supplied input.
Instead of using prepared statements or parameter binding, the exam-update.php code likely builds SQL strings dynamically, directly embedding the test_id value.
This pattern aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') and is related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, as the database is a downstream consumer of the tainted data.
Potential impact
- Extraction of sensitive data from exam or user-related tables
- Unauthorized modification or deletion of assessment and test records
- Creation of fraudulent entries that affect exam integrity or results
- Possible escalation to full database compromise if the database user has broad privileges
- Disruption of the online reviewing workflow through data corruption
General mitigation guidance
Effective mitigation focuses on eliminating direct use of untrusted input in SQL and tightening database privileges:
- Use parameterized queries or prepared statements for all database access involving user input, including test_id.
- Apply strict server-side validation and type enforcement (e.g., numeric checks) on identifiers and other input fields.
- Centralize database-access patterns in a data access layer that enforces safe query construction by default.
- Restrict database user privileges so the application account only has the minimal required operations on needed tables.
- Introduce input normalization and strict whitelisting for IDs and reference parameters used in query predicates.
How teams detect issues like this
Detection can rely on both code-centric and behavior-centric approaches:
- Static analysis rules that flag dynamic SQL construction, string concatenation with request parameters, and absence of prepared statements.
- Manual code review focused on data flows from HTTP parameters (such as test_id) into SQL query builders, especially in administrative modules.
- Runtime monitoring and database activity logging tuned to detect anomalous queries with injected patterns (e.g., tautologies, stacked queries where possible).
- Web application firewalls (WAF) configured with SQL injection signatures as a compensating control, while not a substitute for code fixes.

