Summary
Online Music Site 1.0 contains a SQL injection vulnerability in the AdminDeleteUser.php administrator endpoint, where the ID parameter is used unsafely in database queries.
A remote attacker can manipulate this parameter to alter backend SQL execution, which may lead to unauthorized data access, user account manipulation, or full database compromise when the vulnerable functionality is exposed.
Affected context
The vulnerability manifests in the administrator backend of Online Music Site 1.0, specifically in /Administrator/PHP/AdminDeleteUser.php.
It arises when the ID argument is consumed directly by the application to construct SQL statements without robust validation, escaping, or parameterization.
The issue is present when this admin functionality is network-accessible (e.g., over HTTP/HTTPS) and tied to a database account with permissions to read, modify, or delete user records.
Exploit preconditions
- Attack surface: HTTP/HTTPS endpoint at
/Administrator/PHP/AdminDeleteUser.php - Required access: Ability to send crafted requests to the administrator deletion endpoint (authentication requirements depend on deployment; some may misconfigure or expose it)
- Trigger point: Processing of the
IDparameter during user deletion logic - Why exploitation is possible: The
IDvalue is concatenated or interpolated directly into SQL statements, allowing attacker-controlled input to alter query structure instead of being treated as data
Why this happens
This is a classic instance of CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), potentially overlapping with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.
The application trusts the ID parameter received from the HTTP request and incorporates it into SQL commands without enforcing strict typing, using parameterized queries, or applying context-aware encoding.
As a result, special SQL metacharacters (such as quotes, operators, or comment markers) in attacker-supplied input can break out of the intended query structure and inject additional SQL logic.
Potential impact
- May allow attackers to read sensitive data from the users table and related tables
- Could enable modification or deletion of user accounts and associated records
- May permit creation of administrative or arbitrary accounts via injected SQL
- Could lead to full compromise of the underlying database when combined with stacked queries or powerful DB privileges
- Might expose credentials or session data stored in the database, enabling further application or infrastructure compromise
General mitigation guidance
Effective mitigation focuses on removing direct string concatenation from database access paths and tightening the trust boundary around input parameters:
- Prefer parameterized queries (prepared statements) for all database access, ensuring user input is always treated as data rather than executable SQL
- Enforce strict server-side validation and type-checking on the
IDparameter (e.g., numeric-only, bounded ranges) before any database operation - Centralize database access logic so that all queries pass through a minimal, well-reviewed abstraction layer with safe APIs
- Apply least-privilege principles to database accounts used by the application, limiting them to only the operations genuinely required for admin user management
- Consider generic input-handling guidelines: fail closed on malformed input and avoid relying solely on client-side validation or UI controls
How teams detect issues like this
Organizations can look for patterns characteristic of SQL injection in both code and runtime behavior:
- Static analysis: Use rules that flag raw string concatenation or interpolation into SQL APIs, especially where request parameters like
IDare involved - Code review signals: Watch for direct use of
$_GET,$_POST, or similar request variables inside SQL strings in PHP files; check for absence of prepared statements or binding of parameters - Runtime monitoring: Inspect database logs and web access logs for anomalous patterns such as injected SQL operators, comment markers, or batched statements in the
IDfield - Security testing: Employ automated scanners or manual penetration tests that submit crafted payloads to admin endpoints to validate that injected SQL does not alter query structure

