Summary
The Student Admission System 1.0 contains a SQL injection vulnerability in /index.php, where the eid and did parameters are incorporated into database queries without appropriate sanitization.
A remote attacker can manipulate these parameters to alter SQL statements, potentially accessing, modifying, or deleting backend data, especially when the application directly uses parameter values in dynamically built queries.
Affected context
This vulnerability occurs in web deployments of the Student Admission System 1.0 where /index.php accepts eid and/or did as request parameters and passes them into database queries.
The issue is present when these parameters are concatenated into SQL strings or embedded in query templates without rigorous input handling.
It is especially risky when the application runs with high-privilege database credentials or when the affected queries touch sensitive student records or administrative data.
Exploit preconditions
- Attack surface: HTTP(S) interface of /index.php exposed to users or the public internet.
- Required access: Ability to submit crafted requests containing eid and/or did parameters (e.g., via browser, script, or proxy).
- Trigger point: Server-side processing of /index.php that constructs and executes SQL queries using eid/did.
- Why exploitation is possible: The application dynamically builds SQL statements using unvalidated and unparameterized request data, allowing attacker-controlled input to change the query structure rather than being treated as data.
Why this happens
The root cause aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
The application appears to construct SQL queries by directly concatenating or interpolating the eid and did parameters into SQL strings without using prepared statements or rigorous escaping.
This pattern lets attacker-supplied input introduce SQL control characters and fragments (such as quotes, operators, or subqueries) that alter query logic.
The involvement of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component reflects that untrusted web input flows directly into the database layer without neutralization, making SQL the downstream consumer of tainted data.
Potential impact
- May allow retrieval of sensitive student, faculty, or administrative records from the database.
- Could enable modification or deletion of admission records and related data.
- Can be used to bypass authentication or authorization checks implemented at the database-query level.
- Might permit creation of new privileged application accounts if the database schema and logic allow it.
- In some environments, could lead to execution of database-specific commands or functions that impact availability or integrity of the system.
General mitigation guidance
Effective mitigation focuses on removing direct string concatenation and enforcing strict separation between data and query logic:
- Adopt parameterized queries or prepared statements for all database interactions involving eid, did, and other user-controlled inputs.
- Apply centralized input validation that enforces expected formats (e.g., numeric IDs only) before values reach the data-access layer.
- Use a data-access abstraction or ORM that defaults to safe query construction patterns.
- Restrict database privileges for the application account so that it only has the minimal operations required (e.g., no arbitrary schema changes).
- Implement defense-in-depth with application-level access controls and minimal exposure of database error details to clients.
How teams detect issues like this
Detection can combine code-level review with runtime observations:
- Perform static analysis focused on database access layers, flagging any dynamic SQL built from $_GET, $_POST, or similar request sources without parameterization.
- During code review, look for string concatenation or interpolation around SQL keywords and eid/did usage in /index.php and related includes.
- Enforce secure coding guidelines in CI that require prepared statements for all query constructions.
- Use web application firewalls (WAFs) or runtime application security tools configured with SQL injection signatures and anomaly detection to log and potentially block suspicious requests.
- Periodically run automated DAST tools that test common SQL injection patterns against endpoints like /index.php.

