/

CVE-2026-86222

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in SourceCodester Course Handler

CVE-2026-86222

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

SourceCodester Class and Exam Timetabling System 1.0 contains a SQL injection vulnerability in the course-handling functionality. A remote attacker may manipulate the course input so that database queries are altered, potentially exposing, modifying, or deleting application data.

Affected context

The vulnerability occurs in the administrative course-management workflow, specifically where the course argument is used by admin/modal_add_course2.php and passed to mysqli_query. Risk is present when the affected endpoint is remotely reachable and user-controlled input is incorporated into a SQL statement without adequate parameterization or equivalent query isolation.

Exploit preconditions

  • Attack surface: A remotely accessible web endpoint used by the course-management functionality
  • Required access: Access sufficient to reach the affected request; the exact authentication requirement depends on deployment configuration
  • Trigger point: Processing of the course argument in admin/modal_add_course2.php
  • Why exploitation is possible: Input influences a database query without reliably separating data from SQL commands

Why this happens

The underlying flaw is the construction or execution of a database query using externally influenced input without a safe parameter-binding boundary. This behavior maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) and is also related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, because untrusted input is interpreted by a downstream SQL processor as command structure rather than only as data.

Potential impact

  • An attacker may read sensitive records from the application database.
  • An attacker could alter or delete timetable, course, user, or administrative data.
  • The application may disclose database errors or other internal information.
  • Compromised data could affect scheduling integrity and administrative operations.
  • Database access could provide a path to broader compromise depending on account privileges and deployment design.

General mitigation guidance

Mitigation generally centers on preventing user-controlled values from becoming SQL syntax.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all externally influenced values
  • Applying allowlist validation for identifiers and enumerated course-related values where appropriate
  • Avoiding string concatenation when building SQL statements
  • Restricting database accounts to the minimum permissions required by the application
  • Returning generic database errors while keeping detailed diagnostics in protected logs
  • Separating administrative endpoints from untrusted public access through authentication and authorization controls
  • Treating validation as complementary to, rather than a replacement for, parameterized queries

How teams detect issues like this

Organizations can look for this issue through:

  • Static analysis rules identifying SQL strings assembled with request parameters
  • Code review checks for direct interpolation or concatenation of web input into mysqli_query calls
  • Dynamic testing that monitors database behavior and error responses for unexpected query interpretation
  • Web application firewall or gateway policies that detect suspicious database command patterns, recognizing that filtering is only a defense-in-depth measure
  • Database audit logs showing unusual query structures, access patterns, or privilege use
  • Automated security review tools that flag missing prepared statements and unsafe input flows

Sources

SourceLink
github.comgithub.com/justconter/_CVE/issues/3
vuldb.comvuldb.com/cve/CVE-2026-86222
vuldb.comvuldb.com/submit/897748
vuldb.comvuldb.com/vuln/399375
vuldb.comvuldb.com/vuln/399375/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes, the affected functionality is described as remotely reachable. Practical exploitability still depends on endpoint exposure, authentication, authorization, and network controls.

The available description does not establish a specific authentication requirement. The decisive factor is whether an attacker can reach the affected request with sufficient permission in the deployed configuration.

Use parameterized queries or prepared statements so the database treats supplied values strictly as data, supported by appropriate validation and least-privilege database permissions.

Enforce secure database-access patterns in coding standards, review query construction during code review, scan for unsafe input flows, and monitor database logs for anomalous activity.

Find out what's already
exploitable in your codebase.