/

CVE-2026-111872

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Online-Examination-System

CVE-2026-111872

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database compromise and unauthorized data access

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

A remotely exploitable SQL injection vulnerability affects several database operations in the Online-Examination-System application. An attacker who can influence the id, user, or topic parameters may alter database queries, potentially accessing, modifying, or disrupting examination data.

A remotely exploitable SQL injection vulnerability affects several database operations in the Online-Examination-System application. An attacker who can influence the id, user, or topic parameters may alter database queries, potentially accessing, modifying, or disrupting examination data.

Affected context

The vulnerability occurs in the application's results and database helper components, including functions that validate identifiers, retrieve results, enumerate exams, determine the latest exam, and generate reports. It becomes risky when remotely supplied request parameters are incorporated into SQL statements without reliable parameterization or equivalent query-safety controls.

The vulnerability occurs in the application's results and database helper components, including functions that validate identifiers, retrieve results, enumerate exams, determine the latest exam, and generate reports. It becomes risky when remotely supplied request parameters are incorporated into SQL statements without reliable parameterization or equivalent query-safety controls.

Exploit preconditions

  • Attack surface: Remotely reachable web application endpoints - Required access: Ability to submit requests containing the affected id,

user, or topic parameters; authentication requirements may depend on the

specific endpoint

  • Trigger point: Database-backed operations in results.php and

include/database.php

  • Why exploitation is possible: User-controlled input can influence SQL query

construction without sufficient separation between data and query logic

  • Attack surface: Remotely reachable web application endpoints - Required access: Ability to submit requests containing the affected id,

user, or topic parameters; authentication requirements may depend on the

specific endpoint

  • Trigger point: Database-backed operations in results.php and

include/database.php

  • Why exploitation is possible: User-controlled input can influence SQL query

construction without sufficient separation between data and query logic

Why this happens

The underlying bug is an injection flaw in which externally controlled parameter values are combined with SQL statements as executable query syntax. This maps primarily to CWE-89, Improper Neutralization of Special Elements used in an SQL Command. CWE-74 is also relevant because the broader pattern involves insufficient neutralization of special elements in an interpreted command or language.

The underlying bug is an injection flaw in which externally controlled parameter values are combined with SQL statements as executable query syntax. This maps primarily to CWE-89, Improper Neutralization of Special Elements used in an SQL Command. CWE-74 is also relevant because the broader pattern involves insufficient neutralization of special elements in an interpreted command or language.

Potential impact

  • An attacker may read sensitive examination, user, or report data.
  • An attacker could alter, delete, or corrupt records.
  • The application may expose administrative or other unauthorized database information.
  • Database availability may be degraded through disruptive queries.
  • Additional compromise could occur if the database account has excessive privileges.
  • An attacker may read sensitive examination, user, or report data.
  • An attacker could alter, delete, or corrupt records.
  • The application may expose administrative or other unauthorized database information.
  • Database availability may be degraded through disruptive queries.
  • Additional compromise could occur if the database account has excessive privileges.

General mitigation guidance

Mitigation generally centers on eliminating dynamic SQL construction from untrusted values. Common defensive patterns include parameterized queries or prepared statements, strict allowlist validation for identifiers and other structured inputs, and safe query-builder abstractions. Input trust should be reduced at every request boundary, while database accounts should use the minimum privileges required. Generic error handling, restricted database network exposure, and secure-by-default data-access components can further limit impact.

Mitigation generally centers on eliminating dynamic SQL construction from untrusted values. Common defensive patterns include parameterized queries or prepared statements, strict allowlist validation for identifiers and other structured inputs, and safe query-builder abstractions. Input trust should be reduced at every request boundary, while database accounts should use the minimum privileges required. Generic error handling, restricted database network exposure, and secure-by-default data-access components can further limit impact.

How teams detect issues like this

Detection approaches include static analysis for string concatenation or interpolation in SQL construction, review of all database calls receiving request parameters, and dynamic testing of affected endpoints with non-destructive injection probes. Code review should examine validation functions and ensure that validation is not treated as a substitute for parameterization. CI policies can require approved database-access APIs, reject unsafe query patterns, and flag changes to results.php or database helper code. Automated security review tools may help identify related injection paths.

Detection approaches include static analysis for string concatenation or interpolation in SQL construction, review of all database calls receiving request parameters, and dynamic testing of affected endpoints with non-destructive injection probes. Code review should examine validation functions and ensure that validation is not treated as a substitute for parameterization. CI policies can require approved database-access APIs, reject unsafe query patterns, and flag changes to results.php or database helper code. Automated security review tools may help identify related injection paths.

Sources

SourceLink
github.comgithub.com/itsmeravitejak/Online-Examination-System/
github.comgithub.com/itsmeravitejak/Online-Examination-System/issues/6
vuldb.comvuldb.com/cve/CVE-2026-111872
vuldb.comvuldb.com/submit/1005049
vuldb.comvuldb.com/vuln/421584
vuldb.comvuldb.com/vuln/421584/cti

Frequently asked

questions

Yes. The reported attack surface is remotely reachable, although the exact

scope depends on which affected endpoints are exposed and whether they

require authentication.

An attacker needs the ability to send requests that reach the vulnerable

database operations and influence the relevant id, user, or topic parameters.

Authentication requirements may vary by deployment and endpoint.

Use parameterized queries or prepared statements for every database operation,

with allowlist validation for values that cannot be bound as parameters.

Enforce approved data-access patterns in code review and CI, apply least

privilege to database accounts, test externally supplied parameters, and

avoid exposing detailed database errors to users.

Yes. The reported attack surface is remotely reachable, although the exact

scope depends on which affected endpoints are exposed and whether they

require authentication.

An attacker needs the ability to send requests that reach the vulnerable

database operations and influence the relevant id, user, or topic parameters.

Authentication requirements may vary by deployment and endpoint.

Use parameterized queries or prepared statements for every database operation,

with allowlist validation for values that cannot be bound as parameters.

Enforce approved data-access patterns in code review and CI, apply least

privilege to database accounts, test externally supplied parameters, and

avoid exposing detailed database errors to users.

Find out what's already
exploitable in your codebase.