Overview
CVE-2026-111872 is a SQL injection vulnerability in itsmeravitejak's Online-Examination-System, affecting commits up to and including e6208e630b14657999bbfe4c9912302d2a1e2449. It carries a CVSS 3.1 score of 7.3 (High), was published October 18, 2026, and is classified under CWE-89 (SQL Injection) and CWE-74 (Injection).
This is the second of three related SQL injection advisories disclosed the same day against this project — see also CVE-2026-111871 and CVE-2026-111873. Unlike the other two, which each point to a single vulnerable file, this CVE spans multiple functions across the database interaction layer: MySQLDB::valid, MySQLDB::getresults, MySQLDB::noresults, MySQLDB::getExams, MySQLDB::latestExamID, and MySQLDB::getreport, located in results.php and include/database.php. The flaw is triggered through the id, user, and topic arguments.
A vulnerability spanning six separate methods in a shared database class strongly suggests the class itself builds queries through string concatenation as a general pattern, rather than failing to sanitize input in one isolated function.
Technical Details
| Attribute | Value |
|---|---|
| CVE ID | CVE-2026-111872 |
| Severity | High |
| CVSS v3.1 Score | 7.3 |
| CWE | CWE-89 (SQL Injection) / CWE-74 (Injection) |
| Project | itsmeravitejak / Online-Examination-System |
| Vulnerable Component | results.php, include/database.php |
| Vulnerable Functions | MySQLDB::valid, MySQLDB::getresults, MySQLDB::noresults, MySQLDB::getExams, MySQLDB::latestExamID, MySQLDB::getreport |
| Vulnerable Parameters | id, user, topic |
| Affected Revisions | Up to and including commit e6208e630b14657999bbfe4c9912302d2a1e2449 |
| Attack Vector | Network, low attack complexity, no privileges or user interaction required |
| Related CVEs | CVE-2026-111871, CVE-2026-111873 (same project, same disclosure date) |
| Reported By | VulDB, via GitHub issue #6 |
| Source | NVD |
How It Works
The MySQLDB class appears to be the project's central database-access helper, with each affected method responsible for a distinct piece of exam-results logic: validating a session/user (valid), pulling result sets (getresults, noresults), retrieving exam metadata (getExams, latestExamID), and generating report output (getreport). The id, user, and topic values that drive these lookups appear to be passed directly into SQL statements without parameterization, letting an attacker alter the intended query logic by supplying crafted values for any of the three parameters.
Because getreport and getresults likely power user-facing exam-result pages, this class of bug is reachable by any user capable of requesting a results or report view — a wide, easily-discoverable attack surface compared to an internal admin-only function.
Impact Assessment
| Impact Area | Description |
|---|---|
| Confidentiality | Exam results, scores, and potentially other students' or staff accounts' data are at risk of exposure through injected queries against id/user/topic |
| Integrity | Depending on query context, injected SQL in a results/report path could tamper with stored scores or exam metadata |
| Availability | Malformed injected queries can degrade or crash exam-result retrieval |
| Breadth | Six vulnerable functions across two files in a shared database class indicate the issue is systemic to how the class builds queries, not isolated to one code path |
Recommendations
For Online-Examination-System operators
- Rewrite the
MySQLDBclass to use parameterized queries or prepared statements for every method listed above — patching one function without addressing the shared pattern will leave the others exploitable. - Validate
id,user, andtopicas strict types (e.g., integers for IDs) before they reach any database call. - Review all three related advisories together (CVE-2026-111871, CVE-2026-111872, CVE-2026-111873) — they describe the same underlying weakness across different files.
- Restrict or monitor access to exam-results and report endpoints while awaiting a verified fix.
For security teams
- Deploy WAF rules targeting SQL injection patterns in
id,user, andtopicrequest parameters if this software cannot be patched immediately. - Audit exam-results and reporting database logs for anomalous query patterns.
Key Takeaways
- CVE-2026-111872 is a CVSS 7.3 High SQL injection spanning six functions in the
MySQLDBdatabase class, exploitable viaid,user, andtopic. - It is one of three related SQL injection CVEs disclosed the same day against itsmeravitejak's Online-Examination-System.
- The breadth of affected functions suggests a systemic query-construction weakness, not a single isolated bug.
- The vulnerable code sits behind exam-results and reporting features, making it broadly reachable to any user who can request those views.
- All three related CVEs (CVE-2026-111871, CVE-2026-111872, CVE-2026-111873) should be remediated as a single engineering effort.
Sources
See also: CVE-2026-111871 and CVE-2026-111873, two related SQL injection flaws in the same project.