Summary
PHPGurukul Beauty Parlour Management System 1.1 contains a SQL injection vulnerability in the /admin/accepted-appointment.php endpoint, where the delid parameter is incorporated into database queries without sufficient sanitization.
A remote attacker can send crafted requests to manipulate backend SQL statements, which may lead to data exposure, data tampering, or administrative account compromise under certain configurations.
Affected context
The vulnerability occurs in the administrative area of the Beauty Parlour Management System, specifically within /admin/accepted-appointment.php where appointment-related actions are processed.
It is triggered when the delid request parameter is passed into SQL queries without adequate escaping or parameterization.
The issue is most relevant in deployments where the admin interface is network-accessible and database credentials allow modification or retrieval of sensitive appointment or user data.
Exploit preconditions
- Attack surface: HTTP interface of the Beauty Parlour Management System (admin section, /admin/accepted-appointment.php).
- Required access: Ability to send requests that reach the vulnerable script; depending on deployment, this may require valid admin authentication or may be reachable via weakly protected admin endpoints.
- Trigger point: Submission of a crafted delid parameter value that is concatenated directly into an SQL statement.
- Why exploitation is possible: The application dynamically constructs SQL queries using unvalidated, unsanitized input from delid instead of using parameterized queries or rigorous input validation, allowing an attacker to alter the structure of the SQL query.
Why this happens
At its core, this is a classic SQL Injection (CWE-89) issue, caused by embedding user-supplied input directly into SQL statements without proper separation between data and code.
The delid parameter is likely interpolated into WHERE or DELETE clauses as a raw string, which allows malicious token sequences (such as additional operators or clauses) to be interpreted as part of the query logic rather than plain data.
This also relates to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, because the SQL database acts as a downstream interpreter that receives unneutralized input from the web layer.
Potential impact
- Access to sensitive appointment or customer records stored in the database.
- Unauthorized modification or deletion of appointment data, including accepted appointments.
- Escalation of privileges by tampering with user or admin account data, depending on schema.
- Possible discovery of application configuration information via database error messages.
- In some database configurations, execution of additional database-level commands that can impact application availability or integrity.
General mitigation guidance
Effective mitigation centers on robust input handling and safe database access patterns:
- Use parameterized queries or prepared statements for all database interactions, ensuring user input is always treated as data rather than query logic.
- Apply strict server-side validation on the delid parameter (e.g., enforce numeric types where appropriate) and reject unexpected formats.
- Centralize database access through a data access layer that enforces safe query construction patterns by default.
- Limit database account privileges so that the web application can only perform the minimal required operations on relevant tables.
- Implement generic error handling to avoid exposing raw SQL errors or stack traces that could assist attackers in refining injection attempts.
How teams detect issues like this
Detection can be approached at both code and runtime levels:
- Static analysis: Configure SAST tools or linters to flag dynamic SQL construction where variables (such as $_GET/$_POST parameters) are concatenated into query strings, particularly in admin modules.
- Code review: During manual review, examine all uses of delid and other request parameters in database operations, looking for string interpolation, concatenation, or unvalidated casting.
- Runtime monitoring: Use web application firewalls (WAFs) or intrusion detection systems to monitor for typical SQL injection patterns in HTTP parameters, especially on administrative endpoints.
- Policy enforcement: Establish coding guidelines that mandate prepared statements and strict parameter validation for all database accesses, and verify adherence via CI/CD checks or pre-commit hooks.

