/

CVE-2026-45144

Severity:

HIGH RISK

(8.9)

Stored XSS (CWE-79) in Chamilo LMS Public Profiles

CVE-2026-45144

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Account Takeover and Session Compromise

Severity:

HIGH RISK

(8.9)

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 a stored cross-site scripting vulnerability in publicly reachable user profiles, where editable profile fields are rendered without effective server-side sanitization. An attacker with a student account, including one created through enabled self-registration, may inject content that executes in the browser of visitors such as administrators.

Chamilo LMS contains a stored cross-site scripting vulnerability in publicly reachable user profiles, where editable profile fields are rendered without effective server-side sanitization. An attacker with a student account, including one created through enabled self-registration, may inject content that executes in the browser of visitors such as administrators.

Affected context

The issue occurs in Chamilo LMS deployments where public user profiles are accessible through the /user/{username} endpoint and profile fields can be edited by a student-level user. Risk is increased when self-registration is enabled and when visitors with privileged sessions follow attacker-controlled profile links.

The issue occurs in Chamilo LMS deployments where public user profiles are accessible through the /user/{username} endpoint and profile fields can be edited by a student-level user. Risk is increased when self-registration is enabled and when visitors with privileged sessions follow attacker-controlled profile links.

Exploit preconditions

  • Attack surface: Public user profile pages
  • Required access: A ROLE_STUDENT account, or the ability to self-register when registration is enabled
  • Trigger point: A visitor renders the attacker's public profile
  • Why exploitation is possible: User-editable fields are rendered with autoescaping disabled and lack adequate server-side sanitization on input
  • Attack surface: Public user profile pages
  • Required access: A ROLE_STUDENT account, or the ability to self-register when registration is enabled
  • Trigger point: A visitor renders the attacker's public profile
  • Why exploitation is possible: User-editable fields are rendered with autoescaping disabled and lack adequate server-side sanitization on input

Why this happens

The vulnerability results from storing user-controlled profile content and later rendering it in a template with autoescaping disabled. Because the write path does not sufficiently sanitize or constrain the affected fields, browser-interpreted markup or script content can persist and execute for profile visitors. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as stored cross-site scripting.

The vulnerability results from storing user-controlled profile content and later rendering it in a template with autoescaping disabled. Because the write path does not sufficiently sanitize or constrain the affected fields, browser-interpreted markup or script content can persist and execute for profile visitors. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as stored cross-site scripting.

Potential impact

  • An attacker may execute script in the security context of profile visitors
  • Administrator sessions or authentication-related data could be exposed
  • Session tokens, JWTs, or browser localStorage contents may be exfiltrated where accessible
  • Victims could be redirected to phishing pages or shown manipulated LMS content
  • An attacker could potentially perform unauthorized actions as a victim
  • An attacker may execute script in the security context of profile visitors
  • Administrator sessions or authentication-related data could be exposed
  • Session tokens, JWTs, or browser localStorage contents may be exfiltrated where accessible
  • Victims could be redirected to phishing pages or shown manipulated LMS content
  • An attacker could potentially perform unauthorized actions as a victim

General mitigation guidance

Mitigation generally focuses on treating all profile fields as untrusted content throughout their lifecycle.

Common defensive patterns include:

  • Applying context-aware output encoding by default in templates
  • Removing unnecessary uses of disabled autoescaping
  • Enforcing server-side allowlist-based HTML sanitization when rich text is required
  • Validating and constraining profile-field formats and lengths on the write path
  • Using secure cookie attributes and reducing the exposure of sensitive browser-stored tokens
  • Limiting privileged actions and applying appropriate authorization checks
  • Requiring administrative review or moderation for publicly rendered profile content where practical

Mitigation generally focuses on treating all profile fields as untrusted content throughout their lifecycle.

Common defensive patterns include:

  • Applying context-aware output encoding by default in templates
  • Removing unnecessary uses of disabled autoescaping
  • Enforcing server-side allowlist-based HTML sanitization when rich text is required
  • Validating and constraining profile-field formats and lengths on the write path
  • Using secure cookie attributes and reducing the exposure of sensitive browser-stored tokens
  • Limiting privileged actions and applying appropriate authorization checks
  • Requiring administrative review or moderation for publicly rendered profile content where practical

How teams detect issues like this

Detection approaches may include:

  • Static analysis for templates that disable autoescaping or render raw user-controlled values
  • Code review checks tracing profile fields from request handling and storage to HTML output
  • Tests that submit representative markup to every editable profile field and verify contextual encoding
  • Dynamic application testing for persistent script execution on public profile pages
  • Policy enforcement requiring approved sanitization libraries and secure templating defaults
  • Automated security review tools to identify unsafe output contexts and missing validation

Detection approaches may include:

  • Static analysis for templates that disable autoescaping or render raw user-controlled values
  • Code review checks tracing profile fields from request handling and storage to HTML output
  • Tests that submit representative markup to every editable profile field and verify contextual encoding
  • Dynamic application testing for persistent script execution on public profile pages
  • Policy enforcement requiring approved sanitization libraries and secure templating defaults
  • Automated security review tools to identify unsafe output contexts and missing validation

Sources

SourceLink
github.comgithub.com/chamilo/chamilo-lms/commit/0ba260a851ef48506814baa7a20534c8f0c35057
github.comgithub.com/chamilo/chamilo-lms/releases/tag/v2.0.1
github.comgithub.com/chamilo/chamilo-lms/security/advisories/GHSA-9833-c7cj-x9xm

Frequently asked

questions

Yes, within the application's normal web attack surface, if an attacker can create or edit a student profile and a victim visits the corresponding public profile.

No. A student account may be sufficient, and self-registration can allow an otherwise anonymous user to obtain that access when enabled.

Treat profile fields as untrusted, sanitize permitted rich text on the server, and use context-aware output encoding with template autoescaping enabled by default.

Review all user-controlled data flows to browser output, test stored-content fields for persistent XSS, restrict raw HTML rendering, and enforce secure templating and sanitization policies in development pipelines.

Yes, within the application's normal web attack surface, if an attacker can create or edit a student profile and a victim visits the corresponding public profile.

No. A student account may be sufficient, and self-registration can allow an otherwise anonymous user to obtain that access when enabled.

Treat profile fields as untrusted, sanitize permitted rich text on the server, and use context-aware output encoding with template autoescaping enabled by default.

Review all user-controlled data flows to browser output, test stored-content fields for persistent XSS, restrict raw HTML rendering, and enforce secure templating and sanitization policies in development pipelines.

Find out what's already
exploitable in your codebase.