Summary
A high-severity SQL injection vulnerability affects the Class and Exam Timetabling System 1.0 through the course parameter processed by the administrative course-management endpoint.
A remote attacker who can reach the affected functionality may influence database queries, potentially accessing, modifying, or deleting application data.
Affected context
The vulnerability occurs in the administrative course-management functionality at /admin/modal_add_course1.php, where the course argument is passed into database-query processing. It becomes risky when externally influenced input reaches mysqli_query without sufficiently strict parameterization or validation, and when the endpoint is remotely accessible.
Exploit preconditions
- Attack surface: Remotely accessible administrative web endpoint
- Required access: The ability to send requests to the affected functionality; authentication requirements depend on the deployment's access controls
- Trigger point: Processing of the
courseargument in/admin/modal_add_course1.php - Why exploitation is possible: Attacker-controlled input may be incorporated into a SQL query without adequate separation from query structure
Why this happens
The underlying bug is an injection flaw in which data supplied through a request parameter can affect the structure or meaning of a database query. This behavior maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) and more broadly to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component. The insecure pattern is constructing or executing SQL statements with untrusted input rather than binding values through a parameterized interface.
Potential impact
- An attacker may read unauthorized database records
- An attacker could modify or delete application data
- Database contents may be exposed, corrupted, or used to affect timetable operations
- Account, configuration, or other sensitive records may be compromised
- Depending on database permissions, the compromise could extend to connected application functionality
General mitigation guidance
Mitigation generally centers on separating query structure from user-supplied values and reducing trust in request parameters.
Common defensive patterns include:
- Using parameterized queries or prepared statements for every database operation
- Applying allowlist validation for fields with constrained formats or identifiers
- Avoiding dynamic SQL construction from request data
- Enforcing least-privilege permissions for the application database account
- Returning generic database errors while recording detailed events securely
- Restricting administrative endpoints through authentication, authorization, and network policy
How teams detect issues like this
Organizations can look for SQL injection risks through:
- Static analysis rules identifying string concatenation or interpolation in SQL execution calls
- Code review checks for request parameters passed directly to
mysqli_queryor equivalent APIs - Dynamic application testing that uses benign input variations to identify unexpected query behavior
- Web-application firewall or gateway policies for suspicious query-language patterns, balanced against false positives
- Database audit logs showing abnormal query volume, error rates, or access to unrelated tables
Automated security review tools may help identify unsafe query construction during development.

