Summary
A SQL injection vulnerability in the Online Reviewer Management System allows attacker-controlled input in the assessment databank removal function to influence database queries.
Because the affected endpoint is remotely reachable, an attacker may be able to read, modify, or delete database records when the request is accepted without adequate authorization or query protection.
Affected context
The vulnerability occurs in SourceCodester Online Reviewer Management System 1.0, specifically the assessment databank removal functionality at /reviewer_0/admins/assessments/databank/btn_functions.php?action=remove. Risk is present when the endpoint accepts an externally supplied ID value and incorporates it into a database operation without reliable parameterization, validation, and authorization controls.
Exploit preconditions
- Attack surface: Remotely accessible web application endpoint
- Required access: Ability to send requests to the assessment databank removal function; authentication requirements are deployment-dependent
- Trigger point: Processing of the
IDargument for theremoveaction - Why exploitation is possible: Database query construction may treat attacker-controlled input as SQL syntax rather than as a strictly typed data value
Why this happens
The underlying bug is an injection flaw in which request data is allowed to influence SQL statement structure. This commonly results from concatenating untrusted parameters into queries or otherwise failing to use parameterized database interfaces and strict input validation. It maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) and more broadly to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.
Potential impact
- An attacker may read unauthorized database information
- Database records could be modified or deleted
- Application integrity and reviewer or assessment data could be affected
- Sensitive credentials or personal information could be exposed
- The application may become unavailable if destructive database operations are triggered
General mitigation guidance
Mitigation generally focuses on ensuring that database commands treat request values strictly as data.
Common defensive patterns include:
- Use parameterized queries or prepared statements for all database operations
- Apply allowlisted, type-aware validation to identifier fields such as record IDs
- Enforce authorization checks for the requested assessment or databank record
- Avoid dynamically constructed SQL where a fixed query structure is sufficient
- Return generic errors that do not disclose database details
- Run the application with a database account limited to required operations
- Reduce input trust by validating values at the request boundary and again before persistence
How teams detect issues like this
Organizations can identify SQL injection risks through:
- Static analysis rules for string concatenation or interpolation in SQL queries
- Code review checks for direct use of request parameters in database statements
- Dynamic application testing that supplies unexpected values to identifier parameters
- Web application firewall policies for suspicious database-oriented request patterns
- Database activity monitoring for anomalous queries, unusual errors, or unexpected deletion activity
- Automated security review tools that flag unparameterized query construction

