Summary
SourceCodester Syllabus-Aligned Learning Management & Examination System 1.0 contains an authorization bypass in the exam deletion functionality. A remote attacker who can reach the affected endpoint may manipulate the exam identifier and delete records without the intended authorization checks.
Affected context
The vulnerability occurs in the application's exam-management workflow, specifically the request handling associated with delete_exam.php. It becomes risky when the endpoint relies on a client-supplied exam identifier without consistently verifying that the requesting user is authorized to perform the deletion.
Exploit preconditions
- Attack surface: The remotely accessible exam deletion endpoint
- Required access: Network access to the application; the necessary authentication state depends on deployment configuration
- Trigger point: Processing of the
IDargument bydelete_exam.php - Why exploitation is possible: Authorization checks may not adequately bind the requested exam record to the requesting user's privileges
Why this happens
The underlying issue is an authorization-control failure in which a user-controlled object identifier is accepted without a reliable server-side permission check. This maps primarily to CWE-285: Improper Authorization and is also consistent with CWE-639: Authorization Bypass Through User-Controlled Key, where modifying an identifier can expose an operation on an object outside the caller's permitted scope.
Potential impact
- An attacker may delete examination records without appropriate permission.
- The application could lose assessment content or related administrative data.
- Users may experience disruption to examination workflows.
- The incident could undermine data integrity and administrative accountability.
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the server-side operation boundary rather than trusting request parameters.
Common defensive patterns include:
- Applying deny-by-default authorization checks before every deletion.
- Verifying that the authenticated principal has permission for the specific exam object identified by the request.
- Treating all object identifiers as untrusted and avoiding direct authorization decisions based solely on client-supplied values.
- Using least-privilege roles and separating administrative deletion permissions from ordinary user capabilities.
- Adding confirmation, audit logging, and soft-delete or recovery mechanisms where appropriate.
- Returning consistent responses that do not disclose whether unauthorized objects exist.
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis rules identifying destructive operations that use request parameters without nearby authorization checks.
- Code review checks for direct database deletion based on user-controlled identifiers.
- Tests that attempt access to objects owned by other users or roles with different permissions.
- Monitoring for unusual deletion requests, repeated identifier changes, and destructive actions outside normal administrative patterns.
- Policy enforcement requiring centralized authorization middleware or service-layer checks for sensitive operations.
Automated security review tools may help identify missing object-level authorization, but application-specific permission tests remain important.

