CVE-2024-33997
NoneCVSS
—
EPSS
0.4%
Published
May 31, 2024
CISA due date
—
Cloudanix analysis
A flaw in the way equations are handled could let someone hide harmful code that runs when other people try to edit those equations, risking account takeovers or data leaks.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Web Framework
- Class
- XSS
- Remediation
- Patch
- Effort
- Low
- Patch risk
- Low
What it actually does
Insufficient input sanitization in the equation editor allows injection of malicious script payloads that are stored and later executed in other users' browsers when editing equations.
Why it matters to the business
Attackers can hijack user sessions, steal credentials, or perform unauthorized actions within the learning platform, potentially compromising course content and user data across installations.
How an attack unfolds
An attacker creates or modifies an equation containing a stored script payload; when another user opens the equation editor to edit that equation the payload executes in their browser context.
How to fix it
Upgrade Moodle to the commit e8d03fdae4ec30a40cdc535c8e9e95f30604ec10 or later release that contains the additional sanitization for the equation editor.
How to confirm the fix worked
Confirm the deployed codebase contains commit e8d03fdae4ec30a40cdc535c8e9e95f30604ec10; attempt to save and re-edit a test equation containing known XSS vectors and verify they are neutralized.
Typical attack path
- Attacker identifies equation-editing functionality and crafts a malicious payload
- Payload is saved as part of a shared or user-owned equation
- Victim user opens the equation editor on the affected item
- Browser executes the injected script under the victim's session
How to detect it
Inspect web server and application logs for unusual requests to the equation editor endpoint; monitor for unexpected script execution or DOM modifications reported by users or browser security tools.
What your security team should do
- Apply the fixed commit or upgrade to a patched Moodle release immediately
- Review and restrict equation-editing permissions to trusted roles where feasible
- Enable content-security-policy headers as a defense-in-depth measure
The record
Additional sanitizing was required when opening the equation editor to prevent a stored XSS risk when editing another user's equation.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | moodle/moodle | 0 | 4.1.10 |
| Packagist | moodle/moodle | 4.2.0 | 4.2.7 |
| Packagist | moodle/moodle | 4.3.0 | 4.3.4 |
| Bitnami | moodle | 0 | 4.1.10 |
| Ubuntu:16.04:LTS | moodle | 0 | No fix |
| Ubuntu:18.04:LTS | moodle | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | moodle | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | moodle | 0 | No fix |
| packagist | moodle/moodle | 4.2.0 | 4.2.7 |
| packagist | moodle/moodle | 4.3.0 | 4.3.4 |
Related vulnerabilities
- GHSA-ggxq-2mg9-8966 Moodle has a Remote Code Execution risk via file restore Also affects moodle/moodle
- GHSA-cg8j-5cr2-568q Moodle TeX formula editor is vulnerable to DoS through lack of execution time limits Also affects moodle/moodle
- CVE-2026-26047 A denial-of-service vulnerability was identified in Moodle’s TeX formula editor. Also affects moodle/moodle
- CVE-2026-26045 A flaw was identified in Moodle’s backup restore functionality where specially crafted… Also affects moodle/moodle
- GHSA-5cx4-w4fh-fr57 Moodle Affected by Improper Restriction of Excessive Authentication Attempts Also affects moodle/moodle
- GHSA-8jrv-wx83-w3xj Moodle Inserts Sensitive Information Into Sent Data Also affects moodle/moodle
- GHSA-hcm6-q6pc-xfhm Moodle has an authorization logic flaw Also affects moodle/moodle
- GHSA-qv78-6gpp-hm68 Moodle Open Redirect vulnerability Also affects moodle/moodle