/

CVE-2026-13527

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Exam Timetabling preview4.php

CVE-2026-13527

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

A SQL injection vulnerability in the Class and Exam Timetabling System 1.0 allows crafted input in the course_year_section parameter of preview4.php to alter backend database queries.

When user-supplied data is concatenated into SQL statements without proper sanitization or parameterization, remote attackers may extract, modify, or delete data via the affected endpoint.

Affected context

This vulnerability occurs in deployments of the Class and Exam Timetabling System 1.0 that expose the preview4.php functionality over the network.

It is typically triggered when the course_year_section argument is taken directly from HTTP request data and interpolated into SQL queries in the application's database layer.

The risk increases where input validation is minimal, error messages are verbose, and database accounts used by the application have broad privileges.

Exploit preconditions

  • Attack surface: HTTP requests to preview4.php with the course_year_section parameter.
  • Required access: Network-level access to the web application; no special local access is required.
  • Trigger point: The vulnerable function constructs and executes SQL statements using the course_year_section value without using parameterized queries.
  • Why exploitation is possible: The application dynamically builds SQL strings by concatenating unsanitized user input, corresponding to SQL injection (CWE-89) and improper neutralization of special elements in output (CWE-74).

Why this happens

The underlying bug is the construction of SQL commands by directly embedding user-controlled data into query strings instead of using prepared statements or safe query builders.

This pattern falls under 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, where metacharacters are not constrained before being interpreted by the database engine.

Abstractly, the application trusts course_year_section as benign input, allowing attackers to inject SQL syntax that the database executes as part of the normal query flow.

Potential impact

  • Attackers may read sensitive information from exam and class scheduling tables.
  • Malicious users could modify or delete timetable and student-related records.
  • Database integrity can be undermined, leading to incorrect schedules and operational disruption.
  • In some configurations, the vulnerability may be leveraged to escalate privileges or pivot to other parts of the system using database-level features.

General mitigation guidance

Mitigation typically centers on eliminating direct string concatenation of user input in SQL queries and tightening trust boundaries around parameters.

Common secure patterns include:

  • Using prepared statements with bound parameters for all database interactions.
  • Employing query builder or ORM frameworks that abstract raw SQL construction and enforce parameterization by default.
  • Applying strict server-side validation and canonicalization on fields like course_year_section, restricting them to known formats (e.g., specific year and section identifiers).
  • Ensuring database accounts used by the application follow least privilege principles, limiting the damage if a query is abused.
  • Returning generic error messages from database operations to avoid leaking query structure or schema details.

How teams detect issues like this

SQL injection risks can be detected by:

  • Static analysis rules that flag dynamic SQL string concatenation and unparameterized queries, especially in PHP database APIs.
  • Code reviews that focus on data access layers and look for user input flowing directly into query construction.
  • Application-level security tests, including automated scanning and manual penetration testing with crafted input in parameters like course_year_section.
  • Policy enforcement in CI/CD pipelines requiring prepared statements or approved database access abstractions, with automated tools checking adherence.

Sources

SourceLink
github.comgithub.com/yuanyuandechen/vul/issues/1
vuldb.comvuldb.com/cve/CVE-2026-13527
vuldb.comvuldb.com/submit/840551
vuldb.comvuldb.com/vuln/374535
vuldb.comvuldb.com/vuln/374535/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. An attacker with network access to the web interface can send crafted requests to preview4.php and exploit the vulnerable course_year_section parameter.

Typically only the ability to reach the application over HTTP/HTTPS is required. No valid login may be needed if the endpoint is publicly accessible.

Replace all dynamic SQL string concatenation involving user input with prepared statements and bound parameters, and use a database abstraction that enforces parameterization by design.

Adopt secure coding standards that prohibit raw SQL concatenation, integrate static analysis into the build pipeline, perform focused security code reviews on data access layers, and validate all external inputs against strict schemas before using them in database operations.

Find out what's already
exploitable in your codebase.