Severity:

HIGH RISK

(7.3)

SQL Injection in Online Reviewer System Pretest Question

CVE-2026-2195

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized Data Access and Modification via SQL Injection

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The Online Reviewer System 1.0 contains a SQL injection flaw in the questions-view.php script that processes the ID parameter for pretest assessments.

By manipulating this parameter over the network, an attacker can inject crafted SQL into backend queries, potentially accessing or altering exam-related data without authorization.

Affected context

This vulnerability occurs in the Online Reviewer System 1.0 within the administrator assessment pretest question viewing functionality (/system/system/admins/assessments/pretest/questions-view.php).

It is relevant when the application directly incorporates incoming request parameters (such as ID) into SQL statements without appropriate validation, escaping, or parameterization.

The issue typically manifests in deployments where the web server can reach the database server and the affected script is accessible over the network.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint at /system/system/admins/assessments/pretest/questions-view.php.
  • Required access: Network access to the web application; additional authentication may or may not be required depending on deployment configuration.
  • Input vector: The ID parameter supplied in the request (e.g., query string or POST body).
  • Trigger point: Construction and execution of a database query using the ID value without parameterization or proper filtering.
  • Why exploitation is possible: The application appears to concatenate the raw ID value into a SQL statement, allowing attacker-controlled characters to alter query structure instead of being treated as data.

Why this happens

The underlying bug stems from unsafe construction of SQL queries using untrusted input, aligning with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Instead of using prepared statements or parameterized queries, the code likely interpolates the ID parameter directly into the SQL string, failing to neutralize metacharacters like quotes, operators, and comment delimiters.

This pattern allows an attacker to modify the intended SQL logic, pivoting from simple lookups to arbitrary data extraction or modification.

The involvement of CWE-74 highlights that user-controlled special elements in output (here, the SQL command) are not properly sanitized before being sent to an external interpreter (the database).

Potential impact

  • May allow attackers to read sensitive data from assessment and user-related tables.
  • Could enable modification or deletion of exam questions, answers, or results.
  • Can permit creation or manipulation of administrative or user accounts stored in the database.
  • May allow discovery of database structure, including table and column names.
  • In some configurations, could lead to execution of database-specific functions that impact system integrity or availability.

General mitigation guidance

Effective mitigation focuses on treating all request parameters as untrusted and eliminating dynamic SQL construction patterns.

Recommended defensive strategies include:

  • Adopting parameterized queries or prepared statements for all database interactions, especially where user input influences query criteria.
  • Implementing strict server-side validation and type enforcement for identifiers like ID (e.g., ensuring they are numeric and within expected ranges).
  • Applying a centralized data access layer that abstracts away raw SQL building and enforces secure query construction by default.
  • Restricting database account privileges to the minimum necessary, preventing schema changes or access to unrelated tables even if a query is compromised.
  • Employing consistent output encoding and neutralization practices for any data forwarded to external interpreters, not just databases.

How teams detect issues like this

Organizations can detect and monitor for vulnerabilities of this class using a combination of development-time and runtime techniques:

  • Static analysis: Configure SAST tools to flag string concatenation used to build SQL statements, especially where variables derived from HTTP request parameters appear.
  • Code review: Look for direct usage of $_GET, $_POST, or equivalent request variables in SQL queries; verify that all queries use parameter binding or ORM query builders.
  • Security testing: Use dynamic application security testing (DAST) tools or manual penetration testing to probe endpoints with crafted payloads that expose SQL errors or unexpected responses.
  • Logging and monitoring: Monitor database logs and application error logs for anomalous query patterns, syntax errors, or repeated queries containing typical injection markers, and enforce alerting policies.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/tiancesec/CVE/issues/16
vuldb.comvuldb.com/?ctiid.344898
vuldb.comvuldb.com/?id.344898
vuldb.comvuldb.com/?submit.750005

Frequently asked

questions

Yes. The issue can be triggered remotely by sending crafted requests to the affected questions-view.php endpoint, as long as it is reachable over the network and any required authentication barriers are met.

It depends on how the Online Reviewer System is deployed. If the vulnerable script is behind an authenticated admin interface, an attacker would need admin or other authorized access first. If it is exposed without strict access control, exploitation could occur without prior authentication.

Refactor the affected code to use parameterized queries or prepared statements exclusively, enforcing strict typing on the ID parameter and eliminating any direct concatenation of request data into SQL strings. Centralizing database access logic can make this change more consistent and maintainable.

Establish a development standard that prohibits ad-hoc SQL construction with user input, mandate the use of secure database abstraction layers, and integrate automated security checks (static analysis and security-focused code review) into the development pipeline to catch unsafe patterns early.

Find out what's already
exploitable in your codebase.