Summary
SourceCodester Online Reviewer Management System 1.0 contains a SQL injection vulnerability in the course assessment functionality. A remote attacker may manipulate the Course-related input to alter database queries, potentially accessing, modifying, or damaging application data.
Affected context
The vulnerability occurs in the application's course assessment workflow, specifically in processing associated with /reviewer_0/admins/assessments/course/btn_functions.php. It becomes risky when remotely supplied input is incorporated into database queries without adequate parameterization or validation. The available description does not establish whether authentication is required for the affected endpoint.
Exploit preconditions
- Attack surface: The remotely reachable course assessment functionality
- Required access: Ability to send requests to the affected application endpoint; authentication requirements are deployment-dependent
- Trigger point: Processing of the Course-related argument in
btn_functions.php - Why exploitation is possible: User-controlled input may be interpreted as part of a database query rather than strictly as data
Why this happens
The underlying bug is an injection flaw in which externally influenced input is combined with SQL statements without a sufficiently separated query and data boundary. This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection). CWE-74 is also relevant as a broader injection category covering cases where input is interpreted as executable command syntax.
Potential impact
- An attacker may read unauthorized database records.
- An attacker could alter, insert, or delete application data.
- The vulnerability may enable bypass of application-level access controls implemented through database queries.
- Database availability or integrity could be affected.
- Exposed records may contain reviewer, course, assessment, or administrative information.
General mitigation guidance
Mitigation generally focuses on preserving a strict separation between SQL code and user-controlled values.
Common defensive patterns include:
- Using parameterized queries or prepared statements for all database operations.
- Avoiding string concatenation when constructing SQL statements.
- Applying allowlist validation for values with a constrained format, such as course identifiers.
- Enforcing least-privilege permissions for the application's database account.
- Returning generic database errors so query details are not exposed.
- Treating client-side validation as supplementary rather than as a trust boundary.
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis rules that flag SQL construction using concatenated or interpolated request parameters.
- Code review checks for database calls receiving raw request values.
- Dynamic testing of reachable parameters using non-destructive injection probes in authorized test environments.
- Database monitoring for unusual query structures, error patterns, access volumes, or write activity.
- Policy enforcement requiring approved database abstraction layers and parameter binding.
- Automated security review tools that detect common injection patterns during development.

