CVE-2026-40291: Chamilo LMS has Privilege Escalation via API User Role Modification
Chamilo LMS is an open-source learning management system. In versions prior to 2.0.0-RC.3, an insecure direct object modification vulnerability in the PUT /api/users/{id} endpoint allows any authenticated user with ROLESTUDENT to escalate their privileges to ROLEADMIN by modifying the roles field on their own user record. The API Platform security expression isgranted('EDIT', object) only verifies record ownership, and the roles field is included in the writable serialization group, enabling any user to set arbitrary roles such as ROLEADMIN. Successful exploitation grants full administrative control of the platform, including access to all courses, user data, grades, and administrative settings. This issue has been fixed in version 2.0.0-RC.3.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Chamilo LMSto a version that resolves this vulnerability.Fixed in 2.0.0-RC.3
Event History
Frequently Asked Questions
What is the severity of CVE-2026-40291?
CVE-2026-40291 has been rated as a high severity vulnerability due to the potential for privilege escalation.
How do I fix CVE-2026-40291?
To mitigate CVE-2026-40291, upgrade Chamilo LMS to version 2.0.0-RC.3 or later.
What types of users are impacted by CVE-2026-40291?
CVE-2026-40291 specifically affects authenticated users with ROLE_STUDENT privileges.
What does CVE-2026-40291 exploit?
CVE-2026-40291 exploits an insecure direct object modification vulnerability in the PUT /api/users/{id} endpoint.
Is CVE-2026-40291 present in earlier versions of Chamilo LMS?
Yes, CVE-2026-40291 is present in Chamilo LMS versions prior to 2.0.0-RC.3.