/

CVE-2026-32894

Severity:

HIGH RISK

(7.1)

Insecure Direct Object Reference (IDOR) in Chamilo LMS

CVE-2026-32894

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-476, CWE-639

Impact:

Unauthorized Data Modification and Integrity Loss

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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_mark or resultdelete GET 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.

Sources

SourceLink
github.comgithub.com/chamilo/chamilo-lms/commit/3b03306d1a0301a81b9284e86893b27f518ab151
github.comgithub.com/chamilo/chamilo-lms/commit/740f5a6e192a52a3adde3c3241c86401b1d2c519
github.comgithub.com/chamilo/chamilo-lms/security/advisories/GHSA-rqpg-p95v-fv98

Frequently asked

questions

Yes, if the Chamilo LMS instance is exposed over the internet and a teacher account is compromised or misused, the vulnerability is remotely exploitable via normal web requests. The attacker must be able to authenticate as a teacher-level user.

An attacker needs valid teacher-level credentials or the ability to act under such an account (for example, via credential theft or account takeover). No administrator privileges are required, and student-only accounts are not sufficient.

The most robust fix is to enforce object-level authorization for every grade-modifying action: determine which grade results a teacher may manage based on their assigned courses and roles, and validate that any requested deletion targets fall strictly within that authorized set before performing the operation.

To prevent similar problems, adopt a consistent access control model where controllers never trust user-supplied object identifiers without verifying ownership or scope, centralize authorization logic, use secure framework patterns for resource authorization, and include authorization-focused tests and code review checklists for all endpoints that handle student, grade, or course data.

Find out what's already
exploitable in your codebase.