/

CVE-2026-14641

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in course editing endpoint

CVE-2026-14641

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure and Modification via SQL Injection

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 flaw in the /edit_course.php endpoint via the ID parameter.

An attacker who can send crafted HTTP requests to this function may manipulate backend queries, potentially exposing or altering course and exam data on the server.

Affected context

The vulnerability occurs in the web-based Class and Exam Timetabling System when the /edit_course.php script builds SQL queries using the ID parameter without adequate sanitization or parameterization.

It typically manifests in deployments where user-supplied request parameters are directly concatenated into SQL statements, and where database accounts used by the application hold broad read/write permissions over timetabling and course-related data.

Exploit preconditions

  • Attack surface: HTTP interface to /edit_course.php
  • Required access: Ability to send requests to the application (usually remote, unauthenticated or low-privilege user)
  • Trigger point: Submission of a specially crafted ID parameter during course edit operations
  • Why exploitation is possible: The ID value is incorporated into SQL queries without proper escaping or prepared statements, allowing the attacker's input to change query structure rather than being treated as data.

Why this happens

This issue stems from building SQL queries by concatenating raw user input, a pattern aligned with CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

Instead of treating the ID parameter strictly as data bound through prepared statements, the application mixes it directly into query text, enabling injection of additional SQL syntax.

The lack of central input validation or encoding logic and the reliance on ad hoc query construction make the endpoint susceptible to crafted inputs that manipulate the database layer.

Potential impact

  • May allow unauthorized reading of course, exam, and timetabling records
  • Could enable modification or deletion of database entries related to classes and schedules
  • Can facilitate creation of fake or misleading timetables and course information
  • May be leveraged to escalate impact by extracting authentication data or other sensitive tables if accessible
  • Could act as a stepping stone for broader system compromise if the database user has elevated privileges

General mitigation guidance

Effective mitigation revolves around ensuring that user input cannot alter SQL query structure.

Common patterns include:

  • Using parameterized queries or prepared statements for all database operations involving user-supplied values
  • Centralizing query construction in data access layers that enforce strict binding of parameters
  • Validating and normalizing identifiers such as ID to expected formats (e.g., numeric ranges) before use
  • Restricting database accounts to least-privilege so that compromised queries have limited reach
  • Applying consistent server-side input neutralization for any value used in dynamic query contexts

How teams detect issues like this

Detection typically involves:

  • Static analysis rules that flag string-concatenated SQL statements and direct inclusion of request parameters
  • Code review checklists focused on verifying that all database interactions use prepared statements and parameter binding
  • Runtime monitoring and database activity logging to identify anomalous query patterns, such as unexpected UNIONs or multi-statement payloads
  • Security testing practices (e.g., automated scanners or fuzzers) that probe endpoints with injection payloads and alert on error messages or abnormal responses

Sources

SourceLink
github.comgithub.com/sunjingyuan123/ccvvee/issues/2
vuldb.comvuldb.com/cve/CVE-2026-14641
vuldb.comvuldb.com/submit/846143
vuldb.comvuldb.com/submit/847955
vuldb.comvuldb.com/vuln/376157
vuldb.comvuldb.com/vuln/376157/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. As long as the /edit_course.php endpoint is exposed over the network, an attacker can send crafted HTTP requests to exploit the SQL injection remotely.

Typically only the ability to interact with the web application. Depending on the deployment, this could be an unauthenticated user or a low-privilege account, since the flaw resides in a request parameter.

Rework the affected query logic to use parameterized statements with bound variables, and ensure the ID parameter is validated as a strict identifier (such as an integer) before it reaches the database layer.

Establish a standard data access layer that forbids string-based query concatenation, enforce mandatory use of prepared statements, and incorporate security-focused code review and automated scanning to catch dynamic SQL patterns early.

Find out what's already
exploitable in your codebase.