Severity:

HIGH RISK

(7.3)

SQL Injection in Online Reviewer System 1.0

CVE-2026-2198

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure and Manipulation 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 pretest data loading functionality, where the difficulty_id parameter is incorporated into database queries without proper sanitization.

A remote attacker can manipulate this parameter to alter SQL queries, potentially accessing or modifying assessment-related data and other information stored in the application's database.

Affected context

The vulnerability occurs in the Online Reviewer System 1.0 within the admin assessments pretest logic at /system/system/admins/assessments/pretest/loaddata.php.

The issue is present when the application accepts a difficulty_id parameter from HTTP requests and uses it in SQL queries without safe handling.

This typically affects deployments where the application is exposed over a network and connected to a relational database backend.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint handling requests to /system/system/admins/assessments/pretest/loaddata.php.
  • Required access: Network access to the affected endpoint (authentication requirements depend on deployment but should not be assumed).
  • Trigger point: Supplying a crafted difficulty_id parameter value in a request that reaches the vulnerable SQL query.
  • Why exploitation is possible: The application constructs SQL statements by directly embedding user-controlled difficulty_id data without parameterization or robust input validation, allowing attackers to modify query structure and logic.

Why this happens

The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where user-supplied data is concatenated into SQL statements.

Instead of using parameterized queries or prepared statements, the code likely interpolates difficulty_id directly into the SQL string, trusting it as benign input.

The presence of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component reflects that the SQL interpreter is treated as a downstream component that receives unneutralized data, enabling crafted input to be interpreted as executable SQL rather than passive data.

Potential impact

  • Retrieval of assessment data and other records the database user can access
  • Modification or deletion of exam questions, answers, or pretest configurations
  • Creation of new accounts or privilege changes if the schema allows it
  • Extraction of sensitive user information such as names or contact data stored in the database
  • Potential database service disruption through destructive queries

General mitigation guidance

Effective mitigation focuses on ensuring user-controlled data cannot change SQL query structure.

Recommended patterns include:

  • Using parameterized queries or prepared statements for all database interactions involving difficulty_id and similar parameters
  • Applying strict server-side validation and type enforcement (e.g., integer casting) for identifiers used in queries
  • Centralizing database access in a data access layer that enforces safe query construction by default
  • Restricting database user privileges so the application account has only the minimum permissions necessary (e.g., no DROP/ALTER where not required)
  • Applying defense-in-depth with web application firewalls (WAF) or query allowlisting to reduce exposure to malicious inputs

How teams detect issues like this

Detection generally combines code-centric and environment-centric approaches:

  • Static code analysis: Scan for dynamic SQL construction patterns that interpolate HTTP parameters or request variables, especially around difficulty_id and similar fields.
  • Code review: Flag any occurrences of string concatenation or interpolation in SQL statements, and verify prepared statements are used consistently.
  • Runtime monitoring: Use database query logging and anomaly detection to spot unusual or malformed queries originating from application endpoints.
  • Security testing: Perform focused SQL injection testing (e.g., with automated DAST tools or manual penetration testing) against the pretest/loaddata.php endpoint and related routes.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/tiancesec/CVE/issues/19
vuldb.comvuldb.com/?ctiid.344901
vuldb.comvuldb.com/?id.344901
vuldb.comvuldb.com/?submit.750017

Frequently asked

questions

Yes. An attacker with network access to the Online Reviewer System endpoint handling pretest data can attempt to exploit the SQL injection remotely.

Not necessarily. Exploitability depends on how the endpoint is protected in a given deployment. If the vulnerable route is reachable without strong authentication, anonymous attackers may be able to exploit it.

Refactor the affected database queries to use parameterized statements or prepared queries, enforcing strict typing for difficulty_id and other input fields, and ensure that no user-supplied data is ever concatenated directly into SQL.

Adopt a standard data access layer that only exposes safe, parameterized query APIs; enforce secure coding guidelines and static analysis checks for query construction; and include regular security testing in the development lifecycle to detect injection patterns early.

Find out what's already
exploitable in your codebase.