CVE-2026-40291
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedChamilo 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 ROLE_STUDENT to escalate their privileges to ROLE_ADMIN by modifying the roles field on their own user record. The API Platform security expression is_granted('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 ROLE_ADMIN. 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceChamilo LMS versions before 2.0.0-RC.3 allow any authenticated student to escalate privileges to ROLE_ADMIN via the PUT /api/users/{id} endpoint. The API Platform security check is_granted('EDIT', object) only verifies record ownership without validating role modifications, and the roles field is incorrectly included in a writable serialization group, enabling arbitrary privilege escalation.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data<= 1.11.38= 2.0.0CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed Chamilo LMS versionLocate the version file or admin panel to determine the installed version number (typically found in documentation, composer.json, or admin about page)Affected if Version is 1.11.38 or lower, or version is exactly 2.0.0 (not RC.3 or later)
-
Verify REST API is enabledCheck the application configuration or routing files for the presence of API Platform routes under /api/ endpointAffected if REST API endpoints are accessible and the /api/users endpoint exists
-
Confirm API authentication allows student-level accessTest API access with a low-privilege student account by attempting a GET request to /api/users/{own_id}Affected if Authenticated students can access their own user record via the REST API
-
Inspect serialization group configurationExamine the User entity serialization configuration (typically in src/Entity/User.php or equivalent) for the writable groups on the roles fieldAffected if The roles field is included in a write or edit serialization group that is accessible via the /api/users/{id} PUT endpoint
If the installed version is in the affected range and the REST API is enabled with the roles field writable by authenticated users, the environment is vulnerable to privilege escalation via the identified API endpoint.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to Chamilo LMS version 2.0.0-RC.3 or later, which includes proper authorization checks on the roles field and removes it from writable serialization groups for non-admin users.
2.0.0-RC.3 or later stable release
- 1. Verify current Chamilo LMS version by checking the admin panel or running `grep -r 'version' app/configparameters.php` or similar configuration file
- 2. Backup the entire Chamilo installation directory and database before upgrading
- 3. Download Chamilo LMS version 2.0.0-RC.3 or later from the official repository (github.com/chamilo/chamilo-lms)
- 4. Replace the existing files with the new version, preserving configuration files and custom themes
- 5. Run database migrations if required: `php console doctrine:migrations:migrate` or similar migration command
- 6. Clear caches: `php console cache:clear` or equivalent
- 7. Verify the upgrade by logging in as a student and confirming the PUT /api/users/{id} endpoint no longer allows role modification
- 8. Test that ROLE_STUDENT users cannot modify their own roles through the API
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation6.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,984.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-40291 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-40291 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data