/

CVE-2026-13488

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Class Timetabling System

CVE-2026-13488

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

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

SourceCodester Class and Exam Timetabling System 1.0 contains a SQL injection flaw in preview7.php via the course_year_section parameter.

When user input is concatenated directly into SQL queries, a remote attacker can manipulate database operations and potentially extract or modify sensitive data.

SourceCodester Class and Exam Timetabling System 1.0 contains a SQL injection flaw in preview7.php via the course_year_section parameter.

When user input is concatenated directly into SQL queries, a remote attacker can manipulate database operations and potentially extract or modify sensitive data.

Affected context

The vulnerability occurs in the web-based Class and Exam Timetabling System when preview7.php processes the course_year_section argument as part of a backend query.

It is relevant in deployments where user-controlled values reach the database layer without proper sanitization or parameterization and where the application runs with privileges sufficient to read or change scheduling or related academic data.

The vulnerability occurs in the web-based Class and Exam Timetabling System when preview7.php processes the course_year_section argument as part of a backend query.

It is relevant in deployments where user-controlled values reach the database layer without proper sanitization or parameterization and where the application runs with privileges sufficient to read or change scheduling or related academic data.

Exploit preconditions

  • Attack surface: HTTP requests to the preview7.php endpoint
  • Required access: Network access to the web application (often unauthenticated or low-privileged user input)
  • Trigger point: Submission of crafted course_year_section values that are incorporated into dynamic SQL statements
  • Why exploitation is possible: The application builds SQL queries by concatenating raw user input, failing to use prepared statements or robust input neutralization, allowing injected syntax to alter query behavior
  • Attack surface: HTTP requests to the preview7.php endpoint
  • Required access: Network access to the web application (often unauthenticated or low-privileged user input)
  • Trigger point: Submission of crafted course_year_section values that are incorporated into dynamic SQL statements
  • Why exploitation is possible: The application builds SQL queries by concatenating raw user input, failing to use prepared statements or robust input neutralization, allowing injected syntax to alter query behavior

Why this happens

This issue stems from constructing SQL commands using untrusted input in string form, a classic example of CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

The course_year_section parameter is not strictly validated or bound as a parameter, so metacharacters and SQL keywords supplied by an attacker are interpreted by the database engine.

The problem reflects a broader pattern of mixing business logic with inline query construction rather than separating data from code and enforcing a strict query contract.

This issue stems from constructing SQL commands using untrusted input in string form, a classic example of CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

The course_year_section parameter is not strictly validated or bound as a parameter, so metacharacters and SQL keywords supplied by an attacker are interpreted by the database engine.

The problem reflects a broader pattern of mixing business logic with inline query construction rather than separating data from code and enforcing a strict query contract.

Potential impact

  • An attacker may retrieve sensitive timetable or student-related information from the database.
  • An attacker could modify or delete class and exam scheduling data.
  • An attacker can potentially escalate impact to other tables if the database user has broad privileges.
  • An attacker may leverage SQL functions to further compromise the application environment, depending on database configuration.
  • An attacker may retrieve sensitive timetable or student-related information from the database.
  • An attacker could modify or delete class and exam scheduling data.
  • An attacker can potentially escalate impact to other tables if the database user has broad privileges.
  • An attacker may leverage SQL functions to further compromise the application environment, depending on database configuration.

General mitigation guidance

Effective mitigation focuses on removing the ability for user input to change query structure and on minimizing the privileges of the database account.

Common secure design patterns include:

  • Using parameterized queries or prepared statements for all database interactions.
  • Applying strict server-side validation and canonicalization for fields like course_year_section, limiting allowed characters and formats to known-safe patterns.
  • Enforcing least-privilege for the database user so that even if a query is abused, the scope of accessible data and operations is constrained.
  • Centralizing database access logic and prohibiting ad-hoc dynamic query building in presentation-layer code.

Effective mitigation focuses on removing the ability for user input to change query structure and on minimizing the privileges of the database account.

Common secure design patterns include:

  • Using parameterized queries or prepared statements for all database interactions.
  • Applying strict server-side validation and canonicalization for fields like course_year_section, limiting allowed characters and formats to known-safe patterns.
  • Enforcing least-privilege for the database user so that even if a query is abused, the scope of accessible data and operations is constrained.
  • Centralizing database access logic and prohibiting ad-hoc dynamic query building in presentation-layer code.

How teams detect issues like this

SQL injection risks can be identified through:

  • Static analysis rules that flag string-based SQL construction, concatenation of request parameters, and absence of prepared statements.
  • Manual code reviews focusing on data access layers and checking whether all user inputs are bound parameters with type constraints.
  • Runtime monitoring and database auditing to detect anomalous queries, such as unexpected UNIONs, tautological WHERE clauses, or query patterns inconsistent with normal application behavior.
  • Integration of automated security testing tools (DAST and SAST) into CI pipelines to continuously scan for injection patterns in new or changed code.

SQL injection risks can be identified through:

  • Static analysis rules that flag string-based SQL construction, concatenation of request parameters, and absence of prepared statements.
  • Manual code reviews focusing on data access layers and checking whether all user inputs are bound parameters with type constraints.
  • Runtime monitoring and database auditing to detect anomalous queries, such as unexpected UNIONs, tautological WHERE clauses, or query patterns inconsistent with normal application behavior.
  • Integration of automated security testing tools (DAST and SAST) into CI pipelines to continuously scan for injection patterns in new or changed code.

Sources

SourceLink
github.comgithub.com/yan-124/yan/issues/4
vuldb.comvuldb.com/cve/CVE-2026-13488
vuldb.comvuldb.com/submit/838190
vuldb.comvuldb.com/vuln/374485
vuldb.comvuldb.com/vuln/374485/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. An attacker with network access to the web interface can send crafted requests to preview7.php, making this a remotely exploitable issue.

Typically only the ability to submit the course_year_section parameter, which may be possible as an unauthenticated or low-privileged user depending on how the application is exposed.

Replace all dynamic SQL string-building with parameterized queries, enforce strict input validation for query parameters, and run the database under least-privilege accounts to limit the impact of any misuse.

Adopt a secure data access layer that mandates prepared statements, establish coding standards forbidding inline query concatenation, and incorporate regular security testing and code review processes focused on input handling and database interaction.

Yes. An attacker with network access to the web interface can send crafted requests to preview7.php, making this a remotely exploitable issue.

Typically only the ability to submit the course_year_section parameter, which may be possible as an unauthenticated or low-privileged user depending on how the application is exposed.

Replace all dynamic SQL string-building with parameterized queries, enforce strict input validation for query parameters, and run the database under least-privilege accounts to limit the impact of any misuse.

Adopt a secure data access layer that mandates prepared statements, establish coding standards forbidding inline query concatenation, and incorporate regular security testing and code review processes focused on input handling and database interaction.

Find out what's already
exploitable in your codebase.