/

CVE-2026-14770

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Class Timetabling System

CVE-2026-14770

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure and Manipulation; Possible Auth Bypass

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 SQL injection flaw in the Class and Exam Timetabling System 1.0 allows attackers to manipulate the ID parameter in /edit_room.php to interfere with database queries.

When user-supplied identifiers are embedded directly into SQL statements, remote attackers may extract, modify, or delete application data and potentially escalate their access.

Affected context

This vulnerability appears in the web interface of the SourceCodester Class and Exam Timetabling System, specifically in the code handling room editing via /edit_room.php.

It is likely triggered when the application builds SQL queries based on the ID parameter from HTTP requests without robust validation or parameterization.

Deployments where the application is exposed to untrusted users over a network and uses a shared database with sensitive scheduling or user information are at higher risk.

Exploit preconditions

  • Attack surface: HTTP request handling for /edit_room.php, including GET or POST parameters.
  • Required access: Network access to the web application; no prior authentication may be required depending on access controls for the room-edit feature.
  • Trigger point: Submission of a crafted ID parameter that is concatenated into SQL queries.
  • Why exploitation is possible: The application appears to treat the ID value as trusted input, directly embedding it into SQL without parameter binding or adequate server-side validation, enabling arbitrary SQL fragments to be executed by the database.

Why this happens

The underlying bug aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') and is related to CWE-74: Improper Neutralization of Special Elements in Output.

Application logic responsible for editing room records likely constructs SQL statements by concatenating the ID parameter into query strings, rather than using prepared statements or stored procedures with bound parameters.

Because special characters and SQL control tokens in the ID value are not stripped, escaped, or otherwise neutralized, the database interprets user input as part of the query logic, allowing attackers to alter query behavior and access data beyond the intended scope.

Potential impact

  • Attackers may read or enumerate timetable, room, and user records from the database.
  • Malicious users could modify or delete scheduling data, disrupting class and exam timetables.
  • SQL injection can allow bypass of authentication or authorization checks depending on query design.
  • Under certain configurations, attackers could write arbitrary data or create new accounts with elevated privileges.
  • If the database server has extended capabilities enabled, further system compromise could occur.

General mitigation guidance

Effective mitigation focuses on removing direct string concatenation from SQL construction and reducing trust in user-controlled parameters.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database access, particularly for identifier parameters like ID.
  • Applying strict server-side validation on input fields, enforcing expected formats (e.g., numeric IDs) before interacting with the database.
  • Centralizing database access through a data-access layer that enforces safe query construction by default.
  • Limiting database privileges of the application account so that even if a query is abused, the scope of damage is constrained.
  • Implementing robust error handling that avoids exposing raw SQL errors or stack traces in HTTP responses.

How teams detect issues like this

High-level detection typically combines automated and manual review:

  • Static analysis rules can flag dynamic SQL patterns where request parameters, such as $_GET['ID'] or $_POST['ID'], are concatenated into query strings.
  • Code review checklists should highlight any use of string-based SQL construction in PHP files like /edit_room.php and require prepared statements instead.
  • Runtime security testing and web vulnerability scanning can probe parameters like ID for injection behavior and unusual error responses.
  • Policy-based controls in CI/CD pipelines can block deployments containing known unsafe database APIs or unparameterized query constructs.

Sources

SourceLink
github.comgithub.com/orionyan520/cve_report/issues/3
vuldb.comvuldb.com/cve/CVE-2026-14770
vuldb.comvuldb.com/submit/849106
vuldb.comvuldb.com/vuln/376360
vuldb.comvuldb.com/vuln/376360/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

It is remotely exploitable wherever the /edit_room.php endpoint is reachable over the network. The public availability of exploit details can lower the barrier for attackers, especially if the application is Internet-facing.

An attacker needs the ability to send HTTP requests to the affected endpoint. If room editing is not protected by authentication or is weakly controlled, no prior login may be required, which significantly increases the risk.

The most robust fix is to eliminate dynamic query concatenation and adopt prepared statements or parameterized queries everywhere, combined with strict validation of the ID parameter (for example, enforcing that it is an integer) before it is passed into the database layer.

Establish coding standards that mandate parameterized queries, integrate secure input validation patterns early in design, and enforce these practices with automated static analysis, code review checklists, and security testing as part of the normal development and deployment workflow.

Find out what's already
exploitable in your codebase.