Severity:

HIGH RISK

(7.3)

SQL Injection in Online Reviewer System Student Result View

CVE-2026-2912

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure 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

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_id value 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_id value 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_id and other user-controlled values.
  • Enforce strict typing and validation: treat test_id as 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 like studentresult-view.php that handle IDs and filters.
  • Dynamic testing: Employ DAST tools or security scanners that attempt SQL injection payloads on parameters such as test_id and 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.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/tiancesec/CVE/issues/25
vuldb.comvuldb.com/?ctiid.347221
vuldb.comvuldb.com/?id.347221
vuldb.comvuldb.com/?submit.755219

Frequently asked

questions

Yes. As long as the Online Reviewer System is reachable over the network and the studentresult-view.php endpoint is exposed, an attacker can attempt to exploit the test_id parameter remotely.

It depends on how the application is configured. If the student results page is accessible without login, no authentication is needed; if it is behind a login, any account with access to that page could potentially exploit it.

Refactor all affected queries to use parameterized statements, ensuring that the test_id value is bound as a typed parameter rather than concatenated into the SQL string. Combine this with strict validation that only allows expected numeric values.

Adopt a development standard that prohibits raw SQL concatenation with user input, use a vetted data access abstraction that enforces parameterization by default, integrate automated security testing (SAST/DAST) into the CI pipeline, and perform regular security-focused code reviews for database interaction layers.

Find out what's already
exploitable in your codebase.