/

CVE-2026-13566

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Class Timetabling System

CVE-2026-13566

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exfiltration and Database Compromise

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 vulnerability in SourceCodester Class and Exam Timetabling System 1.0 allows attackers to manipulate the course_year_section parameter in /preview3.php to interfere with backend database queries.

When this input is not properly sanitized or parameterized, a remote attacker can craft requests that may access, modify, or delete data and potentially impact application behavior.

Affected context

The vulnerability occurs in the web interface of the Class and Exam Timetabling System, specifically in the processing logic of /preview3.php where the course_year_section argument is consumed.

It typically exists when user-supplied parameters from HTTP requests are directly embedded into SQL statements on the server side without robust input validation or use of prepared statements, especially in environments where database error output or behavior is observable over the network.

Exploit preconditions

  • Attack surface: Public or internal web endpoint /preview3.php exposed over HTTP/HTTPS.
  • Required access: Network access to the application; no special privileges are generally required beyond the ability to send crafted requests.
  • Trigger point: Submission of malicious content in the course_year_section parameter (e.g., query strings, form data) that reaches the SQL query construction layer.
  • Why exploitation is possible: The parameter value is concatenated or interpolated directly into SQL commands without proper neutralization or parameter binding, allowing attacker-controlled syntax to alter the intended query structure.

Why this happens

This issue stems from constructing SQL queries by dynamically concatenating untrusted input into command strings, instead of treating the input as data through parameterized queries.

The underlying bug maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), with contributing factors from CWE-74: Improper Neutralization of Special Elements in Output, since user-controlled values are insufficiently sanitized before being used in a downstream interpreter (the database).

Conceptually, the pattern is: user input from course_year_section flows directly into SQL, the database parses it as part of the query language, and attacker-controlled special characters (such as quotes and operators) can break out of the intended query structure to execute unintended commands.

Potential impact

  • Attackers may read sensitive timetable or user-related data they are not authorized to access.
  • Malicious queries could modify or delete class and exam scheduling records, disrupting operations.
  • SQL injection can potentially be chained to extract authentication data or configuration information stored in the database.
  • In some environments, attackers could execute administrative database operations or pivot to other parts of the application's data layer.

General mitigation guidance

Effective mitigation centers on eliminating direct concatenation of user input into SQL and reducing the trust placed in request parameters.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database interactions, ensuring user data is always bound as parameters rather than inline SQL.
  • Applying strict server-side validation for business parameters like course_year_section, enforcing expected formats (e.g., numeric IDs or constrained strings) and rejecting invalid input early.
  • Avoiding dynamic query construction based on raw user input; where dynamic behavior is required, constrain it to whitelisted values or predefined query templates.
  • Restricting database privileges for the application account to the minimum needed, limiting the damage of a successful injection.
  • Implementing centralized input-handling utilities that neutralize special elements consistently, reducing inconsistent custom sanitization.

How teams detect issues like this

High-level detection approaches for this kind of vulnerability include:

  • Static analysis rules that flag string-based SQL construction, particularly where request parameters like $_GET or $_POST are concatenated into queries.
  • Secure code review focusing on data flows from web input handlers to database layers, looking for direct interpolation of user-controlled variables such as course_year_section.
  • Runtime application security testing or fuzzing that sends crafted SQL meta-characters to parameters and monitors for database errors, unusual responses, or behavior changes.
  • Policy enforcement in development pipelines that require the use of parameterized query abstractions and prohibit raw query construction patterns in PHP or other server-side code.

Sources

SourceLink
github.comgithub.com/Pluto2362/CVE-2026/issues/2
vuldb.comvuldb.com/cve/CVE-2026-13566
vuldb.comvuldb.com/submit/844223
vuldb.comvuldb.com/vuln/374574
vuldb.comvuldb.com/vuln/374574/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

It is generally exploitable by any attacker who can reach the /preview3.php endpoint over the network and control the course_year_section parameter, making it accessible in many typical web deployments.

That depends on how the application is deployed and whether /preview3.php is protected by authentication.

If the endpoint is publicly accessible, no credentials are needed; if access is limited, an attacker would need at least the level of access required to invoke this page.

Refactor the affected database interactions to use parameterized queries or prepared statements exclusively, combined with strict server-side validation for the course_year_section parameter and other user inputs.

Adopt a development standard that disallows inline SQL string concatenation with user data, use vetted data-access layers or ORM frameworks that promote safe-by-default patterns, enforce least-privilege database accounts, and integrate security-focused code review and automated checks into the CI/CD pipeline.

Find out what's already
exploitable in your codebase.