Summary
Simple Flight Ticket Booking System 1.0 contains a SQL injection vulnerability in Admindelete.php where the flightno parameter is used unsafely in database queries.
A remote attacker can manipulate this parameter to inject arbitrary SQL, potentially leading to data access, modification, or deletion in the application's database.
Affected context
The vulnerability occurs in the Simple Flight Ticket Booking System 1.0 within the Admindelete.php endpoint, which appears to perform administrative delete or management operations based on a flightno parameter.
It is present when user-supplied input is passed directly into SQL statements without adequate validation or parameterization.
This typically affects deployments where the application is exposed over a network and the relevant endpoint can be reached by remote users (authenticated or unauthenticated, depending on configuration).
Exploit preconditions
- Attack surface: HTTP request(s) reaching Admindelete.php, carrying a controllable
flightnoparameter (e.g., query string or POST data). - Required access: Ability to send requests to the vulnerable endpoint; any authentication requirements depend on how the admin area is protected in a given deployment.
- Trigger point: The server-side code constructs and executes an SQL query using the
flightnoparameter directly or via string concatenation. - Why exploitation is possible: The application fails to use prepared statements or proper escaping, allowing crafted input to alter the structure of the SQL query instead of being treated as data.
Why this happens
This issue is an instance of CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and is closely related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.
The underlying bug arises because the flightno parameter is trusted and embedded directly into SQL text, allowing attacker-controlled characters (such as quotes, operators, or comment markers) to escape the intended query structure.
Instead of being strictly treated as a value within a parameterized statement, user input becomes part of the executable SQL syntax, enabling arbitrary query modification.
Potential impact
- Access to sensitive flight booking or passenger records, subject to database permissions.
- Modification or deletion of booking data, flight records, or administrative entries.
- Creation of new accounts or escalation of privileges within the application data model.
- Disclosure of user credentials or other confidential information stored in the database (if stored in retrievable form).
- Potential impact on application availability through destructive queries (e.g., dropping tables or corrupting data).
General mitigation guidance
Effective mitigation centers on treating all external inputs as untrusted and ensuring they cannot alter SQL syntax:
- Use parameterized queries or prepared statements for all database interactions involving user input, including
flightno. - Apply rigorous server-side validation and normalization of identifier-like parameters (such as flight numbers) to only allow expected formats (e.g., alphanumeric with fixed length).
- Avoid dynamic SQL string concatenation; when dynamic query construction is unavoidable, strictly whitelist allowed values and components.
- Enforce least-privilege database accounts so that application queries have only the minimal permissions required for their tasks.
- Centralize database access patterns in a data access layer to enforce secure query construction practices consistently.
How teams detect issues like this
Detection efforts can focus on both code and runtime behavior:
- Static analysis: Use rules that flag SQL strings built via concatenation or interpolation of request parameters (particularly in Admindelete.php and related admin scripts).
- Code review: Look for any use of raw SQL APIs where variables derived from
$_GET,$_POST, or similar superglobals are embedded directly into query strings. - Policy enforcement: Require parameterized queries in coding standards and enforce them via linters or pre-commit hooks.
- Runtime monitoring: Employ web application firewalls (WAFs) and logging to detect suspicious patterns in the
flightnoparameter, such as SQL metacharacters or tautological expressions.

