Summary
Chamilo LMS contains an Insecure Direct Object Reference in the gradebook result view page that allows any authenticated teacher to delete any student's grade result by tampering with specific GET parameters.
Because the application does not verify course ownership or scope before processing deletion requests, a teacher can affect grades outside of their own courses across the entire platform.
Affected context
This vulnerability appears in Chamilo LMS deployments where the gradebook result view is accessible to authenticated teacher-level accounts.
The vulnerable behavior occurs when the application accepts delete_mark or resultdelete GET parameters to delete grade results, but does not confirm that:
- The requesting teacher owns or is assigned to the course or assessment
- The targeted grade result belongs to a student within the teacher's authorized scope
In such conditions, any teacher account can target grade records platform-wide, not just those tied to their own courses.
Exploit preconditions
- Attack surface: Web application interface (gradebook result view HTTP endpoint)
- Required access: Valid authenticated teacher-level account; no elevated administrator role is needed
- Trigger point: HTTP requests to the gradebook result view page that include crafted
delete_markorresultdeleteGET parameters referencing another student's grade result identifier - Why exploitation is possible: The server-side logic performs deletion based solely on the supplied identifier, without verifying that:
- The teacher is associated with the relevant course or grade item
- The action is limited to objects within the teacher's authorization scope
This missing authorization check aligns with CWE-639 (Authorization Bypass Through User-Controlled Key).
Why this happens
The core issue is a broken access control pattern where object-level authorization is not enforced on grade deletion operations.
The application trusts user-controlled identifiers passed via delete_mark or resultdelete GET parameters and directly uses them to select and delete grade records.
Instead of deriving the set of deletable objects from the authenticated teacher's course assignments and then matching against that set, the code accepts arbitrary identifiers and performs the operation.
This reflects the CWE-639 anti-pattern: using externally supplied object references without validating that the requester is authorized to act on the referenced object, leading to an Insecure Direct Object Reference in the gradebook module.
Potential impact
- Teachers could delete grade results for students outside their own courses.
- Grade records for critical assessments could be removed, causing data integrity loss.
- Student academic histories and reporting accuracy could be compromised.
- Administrative overhead may increase due to manual reconstruction or dispute resolution related to missing grades.
- The platform's trustworthiness and auditability could be undermined.
General mitigation guidance
Effective mitigations focus on enforcing strict object-level authorization and limiting trust in user-supplied identifiers:
- Implement authorization checks that derive accessible grade records from the authenticated teacher's assigned courses and assessments, and ensure operations are restricted to that derived set.
- Avoid directly trusting identifiers from GET parameters; instead, resolve targets through server-side context (e.g., current course/session) and then validate ownership or scope.
- Centralize access control logic so that every grade-modifying endpoint consistently applies course and role-based checks.
- Prefer secure-by-default controller patterns that:
- Require POST or other non-idempotent methods for destructive actions.
- Use anti-CSRF tokens and confirmation steps for grade deletions.
- Apply least-privilege role design so that teachers have only the capabilities necessary for managing grades within their courses, not platform-wide.
How teams detect issues like this
Organizations can look for this class of issue using a mix of review and testing approaches:
- Static analysis and code review:
- Search for controller actions or endpoints that delete or modify grade data based on request parameters like
delete_mark,resultdelete, or generic ID fields. - Verify that each such action invokes a centralized authorization check that ties the targeted record to the authenticated user's course or role context.
- Flag patterns where raw request parameters are used directly in queries (e.g.,
delete from grades where id = ?) without prior scope validation. - Dynamic and penetration testing:
- With a teacher-level test account, attempt to manipulate identifiers in grade-related URLs or query strings to access or modify records belonging to other courses.
- Observe whether the system blocks cross-course access with clear authorization errors.
- Logging and monitoring:
- Log grade deletion events with identifiers for acting user, affected student, course, and assessment.
- Monitor for anomalies, such as a single teacher deleting grades across many unrelated courses or programs.

