/

CVE-2026-16152

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Class Timetabling System

CVE-2026-16152

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database Compromise 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

An SQL injection vulnerability in the Class and Exam Timetabling System allows attackers to manipulate the ID parameter in /edit_rooma.php to influence backend database queries.

When user-supplied input is embedded into SQL statements without proper validation or parameterization, remote attackers can extract, modify, or delete data and potentially gain broader system access.

Affected context

The vulnerability occurs in the edit_rooma.php functionality of the Class and Exam Timetabling System when handling the ID argument for room-related operations.

It typically manifests in deployments where user-provided identifiers are concatenated directly into SQL queries, and where the application is exposed to untrusted users over a network (e.g., internet-facing or multi-user academic environments).

The risk is higher in configurations that grant the application broad database privileges or store sensitive student, staff, or scheduling data without additional access controls.

Exploit preconditions

  • Attack surface: HTTP interface to /edit_rooma.php handling room edit or lookup requests.
  • Required access: Ability to send crafted requests to the vulnerable endpoint (usually as an unauthenticated or low-privileged user).
  • Trigger point: Submission of a malicious ID parameter that the application interpolates into SQL statements.
  • Why exploitation is possible: The server-side code directly incorporates the ID value into queries without using parameterized statements or sufficient input validation, enabling injection of arbitrary SQL fragments.

Why this happens

This issue stems from constructing SQL queries by string concatenation with untrusted input.

The ID parameter is treated as a trusted value and inserted directly into the query text, violating the principle of separating data from code.

Conceptually, this maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, and is related to CWE-74: Improper Neutralization of Special Elements in Output, as the input is not sanitized before being embedded into a command interpreted by the database engine.

As a result, attackers can alter the structure and logic of SQL statements beyond the developer's intent.

Potential impact

  • Attackers may read sensitive student, staff, or schedule information from the database.
  • They could modify or delete timetable, room, or exam records, disrupting academic operations.
  • Malicious users can create or escalate application accounts by manipulating authentication or authorization tables.
  • In some deployments, attackers may execute database-native commands leading to broader server compromise.
  • Data integrity can be undermined, causing long-term reliability and auditing issues.

General mitigation guidance

Effective mitigation focuses on preventing untrusted input from altering SQL command structure and reducing the blast radius of any query.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database interactions, especially when handling identifiers like ID.
  • Applying strict input validation and type enforcement (e.g., numeric checks for IDs) before passing values to the database layer.
  • Centralizing database access through a well-audited data access layer rather than building ad hoc queries in presentation code.
  • Applying least-privilege to database accounts so application queries cannot perform administrative or system-level operations.
  • Implementing secure-by-default frameworks or ORMs that abstract away raw SQL construction where feasible.

How teams detect issues like this

Detection typically combines code-level and runtime analysis:

  • Static analysis rules can flag string concatenation patterns in database calls and identify unsanitized parameters like ID used in query construction.
  • Manual code reviews should look for direct use of $_GET, $_POST, or similar request variables in SQL statements, and verify that prepared statements are consistently used.
  • Security testing and automated scanning (e.g., SAST/DAST tools) can probe endpoints such as /edit_rooma.php with injection payloads to detect anomalous error responses or data leakage.
  • Policy enforcement in CI/CD can require that new database access code follow parameterization guidelines and pass security checks before deployment.

Sources

SourceLink
github.comgithub.com/justconter/cve/issues/6
vuldb.comvuldb.com/cve/CVE-2026-16152
vuldb.comvuldb.com/submit/857078
vuldb.comvuldb.com/vuln/379918
vuldb.comvuldb.com/vuln/379918/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

It can be exploited remotely by anyone who can reach the /edit_rooma.php endpoint and control the ID parameter, making it broadly exploitable in internet-facing or shared environments.

Typically only basic HTTP access to the application is required; in many deployments, no prior authentication is necessary to interact with the vulnerable parameter.

Replace all dynamically built SQL statements with parameterized queries or prepared statements, and enforce strict validation on the ID parameter so only expected, well-formed values are ever passed to the database.

Adopt secure coding practices that prohibit inline query concatenation, use frameworks or ORMs that default to safe query construction, integrate static and dynamic security testing into the development lifecycle, and train developers to treat all user input as untrusted by default.

Find out what's already
exploitable in your codebase.