/

CVE-2026-111871

Severity:

HIGH RISK

(7.3)

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

CVE-2026-111871

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized database access and data 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

A remotely reachable SQL injection vulnerability in the Online-Examination-System may allow attackers to influence database queries through query, qtype, sortname, or sortorder parameters. Depending on database permissions and application exposure, successful exploitation could disclose, alter, or delete stored data.

A remotely reachable SQL injection vulnerability in the Online-Examination-System may allow attackers to influence database queries through query, qtype, sortname, or sortorder parameters. Depending on database permissions and application exposure, successful exploitation could disclose, alter, or delete stored data.

Affected context

The weakness occurs in the subject-management database functionality implemented in qsdb/usersdb/brandb/topicsdb/subjectsdb.php. It may be present when externally supplied values for query, qtype, sortname, or sortorder are incorporated into database statements without adequate parameterization or context-aware validation. The attack surface is potentially exposed through remotely accessible application endpoints.

The weakness occurs in the subject-management database functionality implemented in qsdb/usersdb/brandb/topicsdb/subjectsdb.php. It may be present when externally supplied values for query, qtype, sortname, or sortorder are incorporated into database statements without adequate parameterization or context-aware validation. The attack surface is potentially exposed through remotely accessible application endpoints.

Exploit preconditions

  • Attack surface: Remotely accessible Online-Examination-System functionality - Required access: Access to the affected endpoint; authentication requirements

depend on deployment and endpoint authorization

  • Trigger point: Processing of query, qtype, sortname, or sortorder parameters - Why exploitation is possible: Attacker-controlled input may reach SQL query

construction without reliable separation between data and database commands

  • Attack surface: Remotely accessible Online-Examination-System functionality - Required access: Access to the affected endpoint; authentication requirements

depend on deployment and endpoint authorization

  • Trigger point: Processing of query, qtype, sortname, or sortorder parameters - Why exploitation is possible: Attacker-controlled input may reach SQL query

construction without reliable separation between data and database commands

Why this happens

The underlying bug is the use of untrusted request data in database query construction without consistently binding values as parameters or enforcing safe, context-specific validation. This behavior maps primarily to CWE-89, Improper Neutralization of Special Elements used in an SQL Command, and is also related to CWE-74, Improper Neutralization of Special Elements in Output Used by a Downstream Component. The insecure pattern allows input intended as ordinary search, sorting, or filtering data to affect SQL statement interpretation.

The underlying bug is the use of untrusted request data in database query construction without consistently binding values as parameters or enforcing safe, context-specific validation. This behavior maps primarily to CWE-89, Improper Neutralization of Special Elements used in an SQL Command, and is also related to CWE-74, Improper Neutralization of Special Elements in Output Used by a Downstream Component. The insecure pattern allows input intended as ordinary search, sorting, or filtering data to affect SQL statement interpretation.

Potential impact

  • An attacker may read sensitive records from the application database.
  • An attacker could modify examination, user, subject, or configuration data.
  • An attacker may delete or corrupt database records.
  • An attacker could bypass intended data-access restrictions.
  • Database compromise could enable further application or organizational impact.
  • An attacker may read sensitive records from the application database.
  • An attacker could modify examination, user, subject, or configuration data.
  • An attacker may delete or corrupt database records.
  • An attacker could bypass intended data-access restrictions.
  • Database compromise could enable further application or organizational impact.

General mitigation guidance

Mitigation generally focuses on eliminating dynamic SQL construction from untrusted input paths. Common defensive patterns include using parameterized queries or prepared statements for values, mapping sorting and filtering options to fixed server-side allowlists, and applying strict type and format validation before database access. Database accounts should follow least privilege, and sensitive endpoints should use authentication and authorization controls. Error responses should avoid exposing SQL details, while input trust should be minimized through server-side validation rather than relying on client controls.

Mitigation generally focuses on eliminating dynamic SQL construction from untrusted input paths. Common defensive patterns include using parameterized queries or prepared statements for values, mapping sorting and filtering options to fixed server-side allowlists, and applying strict type and format validation before database access. Database accounts should follow least privilege, and sensitive endpoints should use authentication and authorization controls. Error responses should avoid exposing SQL details, while input trust should be minimized through server-side validation rather than relying on client controls.

How teams detect issues like this

Detection approaches include static analysis for string concatenation or interpolation in SQL statements, review of database calls that consume request parameters, and checks that sort and filter fields are selected from fixed allowlists. Dynamic testing can monitor for database errors, unexpected query behavior, and anomalous parameter patterns in authorized test environments. Web-application firewalls, database activity monitoring, and centralized logging can provide policy enforcement and alerting for suspicious query activity.

Detection approaches include static analysis for string concatenation or interpolation in SQL statements, review of database calls that consume request parameters, and checks that sort and filter fields are selected from fixed allowlists. Dynamic testing can monitor for database errors, unexpected query behavior, and anomalous parameter patterns in authorized test environments. Web-application firewalls, database activity monitoring, and centralized logging can provide policy enforcement and alerting for suspicious query activity.

Sources

SourceLink
github.comgithub.com/itsmeravitejak/Online-Examination-System/
github.comgithub.com/itsmeravitejak/Online-Examination-System/issues/5
vuldb.comvuldb.com/cve/CVE-2026-111871
vuldb.comvuldb.com/submit/1005048
vuldb.comvuldb.com/vuln/421583
vuldb.comvuldb.com/vuln/421583/cti

Frequently asked

questions

Yes. The described attack surface is remotely reachable, although actual

exploitability depends on endpoint exposure, authentication, authorization, and

deployment configuration.

The attacker needs network access to an affected application function and the

ability to submit the relevant parameters. Whether a valid account is required

depends on the access controls applied to that function.

Use parameterized queries or prepared statements, and represent sortable or

filterable fields through server-side allowlists rather than inserting request

values directly into SQL syntax.

Combine secure database APIs, strict server-side input validation, least-privilege

database accounts, code review, static analysis, and authorized dynamic testing

of all request parameters that influence database operations.

Yes. The described attack surface is remotely reachable, although actual

exploitability depends on endpoint exposure, authentication, authorization, and

deployment configuration.

The attacker needs network access to an affected application function and the

ability to submit the relevant parameters. Whether a valid account is required

depends on the access controls applied to that function.

Use parameterized queries or prepared statements, and represent sortable or

filterable fields through server-side allowlists rather than inserting request

values directly into SQL syntax.

Combine secure database APIs, strict server-side input validation, least-privilege

database accounts, code review, static analysis, and authorized dynamic testing

of all request parameters that influence database operations.

Find out what's already
exploitable in your codebase.