/

CVE-2026-13565

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Class Timetabling System

CVE-2026-13565

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized Database Access and 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

SourceCodester Class and Exam Timetabling System 1.0 contains a SQL injection flaw in the /edit_class1.php endpoint via the ID parameter.

When user-supplied ID values are concatenated into SQL queries, a remote attacker can manipulate the database and potentially access or modify sensitive scheduling data.

Affected context

The vulnerability arises in the web application's class-editing functionality exposed by /edit_class1.php.

It typically occurs when incoming request parameters (such as ID) are used directly in SQL statements without adequate validation or parameterization.

This is most relevant in deployments where user input reaches database queries through legacy or ad-hoc data access code that does not enforce strict query construction rules.

Exploit preconditions

  • Attack surface: HTTP interface of the SourceCodester Class and Exam Timetabling System.
  • Required access: Ability to send crafted requests to /edit_class1.php (usually as a regular or unauthenticated web user, depending on configuration).
  • Trigger point: Submission of a specially crafted ID parameter that is embedded directly into an SQL query.
  • Why exploitation is possible: The application builds SQL statements using string concatenation or unescaped interpolation, allowing arbitrary SQL fragments to be injected and executed by the database engine.

Why this happens

This issue is rooted in unsafe construction of SQL queries, where user-controlled data is treated as part of executable SQL rather than as a bound value.

The behavior 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 special characters in the ID parameter are not neutralized before being sent to the database.

Abstractly, the pattern is: accepting external input, trusting it as syntactically valid query content, and failing to use parameterized or prepared statements, thereby allowing attackers to alter the intended structure of database operations.

Potential impact

  • Attackers may read class and exam scheduling data they are not authorized to access.
  • Data such as class records, exam timetables, and user information could be modified or deleted.
  • The application's authentication or authorization data may be tampered with, enabling privilege escalation.
  • In some configurations, attackers can execute administrative SQL commands, affecting the stability and integrity of the database.
  • The vulnerability can be chained with other weaknesses to gain broader control over the application environment.

General mitigation guidance

Effective mitigation focuses on removing direct concatenation of user input into SQL and tightening the trust boundaries around query construction.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database interactions, ensuring that user input is bound as data, not as query syntax.
  • Implementing strict validation and normalization for identifiers like ID, only allowing expected formats (such as numeric values) and rejecting or sanitizing anything else.
  • Centralizing data access logic in a well-reviewed abstraction layer to reduce ad-hoc query construction in presentation code.
  • Applying least-privilege principles to database accounts so that even if a query is abused, its ability to alter sensitive schemas and tables is limited.
  • Designing the system so user-controlled data is never directly used to define query structure, table names, or column lists.

How teams detect issues like this

Detection typically combines static analysis, code review, and runtime monitoring:

  • Static analysis rules can flag SQL statements assembled via string concatenation or interpolation that incorporate request parameters such as ID.
  • Manual code reviews should look for direct use of superglobals or request variables in query-building logic, absence of prepared statements, and missing validation on numeric identifiers.
  • Security-focused unit and integration tests can include negative cases where malicious patterns (e.g., quote characters, logical operators, UNION clauses) are supplied as input and checked for safe handling.
  • Web application firewalls and query anomaly detection tools can help identify suspicious SQL patterns at runtime, acting as an additional safeguard but not a replacement for secure coding practices.
  • Automated code scanning tools integrated into CI can enforce policies that disallow non-parameterized queries in the codebase.

Sources

SourceLink
github.comgithub.com/Pluto2362/CVE-2026/issues/3
vuldb.comvuldb.com/cve/CVE-2026-13565
vuldb.comvuldb.com/submit/844222
vuldb.comvuldb.com/vuln/374573
vuldb.comvuldb.com/vuln/374573/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

It is remotely exploitable via the web interface, and any user who can reach /edit_class1.php and control the ID parameter may attempt to leverage the flaw, subject to deployment-specific access controls.

The attacker generally needs network access to the application and the ability to send requests with crafted parameters. Depending on how the timetabling system is configured, this might require an application login or may be possible without authentication.

The safest approach is to rewrite the affected data access logic to use parameterized queries or prepared statements everywhere, combined with strict input validation that constrains ID values to expected types and formats.

Adopt a standard database access layer that enforces parameterization by default, train developers to avoid building SQL through string concatenation, and integrate static analysis and security checks into the development pipeline so that unsafe patterns are flagged before deployment.

Find out what's already
exploitable in your codebase.