Summary
Online Reviewer System 1.0 contains a SQL injection vulnerability in user-delete.php, where the ID parameter is used unsafely in database queries.
A remote attacker can manipulate this parameter to alter SQL statements, which may lead to unauthorized data access, modification, or deletion within the application's database.
Affected context
This vulnerability occurs in the administrative user management functionality of the Online Reviewer System, specifically in the user deletion workflow implemented in system/admins/manage/users/user-delete.php.
It affects deployments where user-supplied input (the ID parameter) reaches the database layer without robust server-side validation or parameterization.
The risk is highest when the application is exposed to the internet, administrative endpoints are weakly protected, or when attackers can reach the vulnerable script directly via crafted HTTP requests.
Exploit preconditions
- Attack surface: HTTP(S) interface to
user-delete.php, typically via GET or POST requests. - Required access: Ability to send requests to the application endpoint; in some deployments this may require authenticated access to admin features, but misconfigurations can expose the script more broadly.
- Trigger point: Invocation of
user-delete.phpwith a craftedIDparameter that is concatenated into a SQL query. - Why exploitation is possible: The
IDargument is incorporated into SQL statements without proper parameterization or sanitization, allowing attacker-controlled fragments to change the structure and behavior of the query.
Why this happens
The underlying flaw maps to 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 application likely builds SQL queries by string concatenation or interpolation using the ID parameter, assuming it is a safe numeric identifier.
Because no prepared statements, bound parameters, or rigorous server-side validation are applied, attacker-controlled input is treated as part of the SQL syntax rather than as data.
This insecure pattern allows modification of WHERE clauses, execution of stacked queries in some configurations, or forced errors that can reveal database structure.
Potential impact
- Unauthorized reading of user or reviewer data from the database
- Modification or deletion of user accounts and related records
- Escalation of privileges by manipulating authentication or role records
- Disruption of application functionality by corrupting or removing critical data
- Potential foothold for further compromise if database credentials or sensitive configuration values are exposed
General mitigation guidance
Effective mitigation focuses on data-layer hardening and strict separation between code and data in SQL operations.
Recommended patterns include:
- Use parameterized queries or prepared statements for all database interactions involving user input, ensuring the
IDvalue is always bound as data. - Apply strict server-side validation and type enforcement for identifiers, rejecting non-conforming values early (e.g., numeric-only constraints, length limits).
- Centralize database access through a safe abstraction layer or ORM that discourages raw query concatenation.
- Implement least-privilege for database accounts so that compromised queries have minimal write and administrative capabilities.
- Introduce generic error handling that does not expose SQL errors or schema details to clients, reducing information leakage.
How teams detect issues like this
Detection typically combines code-centric and behavior-centric approaches:
- Static analysis: Scan the PHP codebase for dynamic SQL construction involving request parameters (e.g.,
$_GET['ID'],$_POST['ID']) and string concatenation into query strings. - Code review: Flag direct usage of superglobals in SQL, inline query construction in controller scripts, and absence of prepared statements in data access code.
- Dynamic testing: Use web application security testing (DAST) tools or manual testing with crafted payloads to detect anomalous database responses, errors, or unexpected result sets.
- Policy enforcement: Enforce coding standards that mandate prepared statements for all queries and integrate automated checks in CI pipelines to detect violations.

