Severity:

HIGH RISK

(7.3)

SQL Injection in Online Reviewer System exam-update.php

CVE-2026-2196

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized Database Access and Manipulation

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 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.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/tiancesec/CVE/issues/17
vuldb.comvuldb.com/?ctiid.344899
vuldb.comvuldb.com/?id.344899
vuldb.comvuldb.com/?submit.750011

Frequently asked

questions

Yes. The vulnerable exam-update endpoint is reachable over the network, and an attacker can exploit the issue by sending crafted HTTP requests that manipulate the test_id parameter, subject to any authentication or access controls in front of the endpoint.

It depends on how the Online Reviewer System is deployed. If the /system/system/admins/assessments/pretest/exam-update.php path is protected behind authentication, an attacker would need valid credentials or another way to access that endpoint. If it is exposed without proper access control, unauthenticated exploitation may be possible.

The most robust fix is to refactor all affected database calls to use prepared statements or parameterized queries and to strictly validate and type-check test_id as an integer (or appropriate type) before it reaches the query layer. Removing all dynamic SQL string concatenation involving user input is key.

Establish a secure data-access pattern that mandates parameterized queries, enforce input validation at centralized boundaries, and incorporate regular security-focused code reviews and static analysis checks. Adopting secure coding guidelines and training developers on SQL injection risks further reduces the likelihood of recurrence.

Find out what's already
exploitable in your codebase.