/

CVE-2026-39878

Severity:

CRITICAL RISK

(9.3)

Stored XSS (CWE-79) in Chamilo LMS Registration

CVE-2026-39878

Deferred

Vulnerability type

Category:

Cross-Site Scripting (Stored)

CWE:

CWE-79

Impact:

Account Takeover and Session Hijacking

Severity:

CRITICAL RISK

(9.3)

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 up to version 1.11.38 contains a stored cross-site scripting flaw in the user registration form that allows untrusted input to be saved and later rendered as active JavaScript.

An unauthenticated attacker can register with malicious payloads that execute in an administrator's browser session, potentially enabling full platform admin account takeover when the admin reviews user data.

Affected context

The vulnerability exists in the Chamilo LMS user registration workflow where user-supplied fields are stored and later displayed in the administrative interface.

It manifests in deployments where:

  • User registration is publicly accessible or loosely controlled
  • Administrative views render registration data without robust output encoding
  • Browsers execute embedded script content when admins review or manage user accounts

Exploit preconditions

  • Attack surface: Public-facing registration form of the Chamilo LMS instance
  • Required access: No prior authentication; attacker only needs the ability to submit a registration request
  • Trigger point: An administrator later opens or manages the maliciously crafted user account or related admin view displaying stored fields
  • Why exploitation is possible: User-controlled data is stored and rendered into HTML responses without context-appropriate escaping or sanitization, allowing JavaScript execution in the admin's browser

Why this happens

The core issue is a lack of proper output encoding and contextual sanitization when rendering stored user input into HTML pages.

This maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting), where application code embeds untrusted data directly into web content.

In the stored XSS variant, malicious payloads are persisted in the database and later reflected back into privileged views, causing script execution in the browser of high-value users such as administrators.

Potential impact

  • Attackers can execute arbitrary JavaScript in an administrator's browser session
  • Admin cookies, session tokens, or local storage data may be read or exfiltrated
  • Full administrative account takeover can occur via automated actions (e.g., changing passwords, creating new admin users)
  • Modification or deletion of LMS courses, users, and content can be performed using the admin's privileges
  • Pivoting to other internal systems may be possible if the LMS is integrated with single sign-on or other administrative tools

General mitigation guidance

Effective mitigation focuses on robust output encoding and strict handling of untrusted input across all UI contexts.

Common defensive patterns include:

  • Applying context-aware HTML, attribute, and JavaScript encoding for all user-controlled data before rendering
  • Enforcing a strict allowlist of characters or formats for registration fields and rejecting or normalizing unexpected input
  • Centralizing templating and encoding logic to avoid ad hoc string concatenation in views
  • Implementing a Content Security Policy (CSP) that reduces the impact of injected scripts by disallowing inline JavaScript where feasible
  • Separating display concerns so that administrative interfaces only render safe, pre-sanitized representations of user data

How teams detect issues like this

Detecting this class of issue typically involves a combination of automated and manual techniques:

  • Static analysis rules that flag direct insertion of request or database fields into HTML without passing through encoding helpers
  • Secure coding guidelines and code review checklists that require verifying proper escaping of all user-supplied values in templates and views
  • Dynamic application security testing (DAST) or automated scanners configured to submit XSS payloads via registration and other public forms, then check for later execution in authenticated views
  • Logging and monitoring of unusual admin-side behavior, such as unexpected background requests initiated from admin pages, which can indicate active XSS exploitation

Sources

SourceLink
github.comgithub.com/chamilo/chamilo-lms/security/advisories/GHSA-gcjp-f7jm-rrrg
vokecyber.comvokecyber.com/research/cve-2026-39878-chamilo-lms-stored-xss

Frequently asked

questions

It is broadly exploitable because it resides in the public registration form; any unauthenticated user who can submit a registration can attempt exploitation, and the payload triggers when an administrator views the stored data.

No prior credentials are required; the only prerequisite is the ability to access the registration feature and submit crafted input, making it possible for external attackers to target administrators.

The most reliable fix pattern is to enforce consistent, context-aware output encoding for all user-controlled data in admin and user interfaces, paired with strict validation of registration fields so that unsafe content is never stored or rendered.

Long-term prevention involves adopting secure templating frameworks with automatic escaping, establishing coding standards that prohibit direct insertion of untrusted data into HTML, integrating static and dynamic security testing into CI/CD, and, where feasible, deploying a defense-in-depth Content Security Policy.

Find out what's already
exploitable in your codebase.