CVE-2024-34000
NoneCVSS
—
EPSS
0.5%
Published
May 31, 2024
CISA due date
—
Cloudanix analysis
A Moodle reporting page could let someone hide harmful code that runs automatically when others view the page, potentially exposing their accounts or data.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Other
- Component
- Application
- Class
- XSS
- Remediation
- Patch
- Effort
- Low
- Patch risk
- Low
What it actually does
Insufficient sanitization of ID numbers in the lesson overview report allows injection and persistent storage of malicious scripts that execute in other users' browsers.
Why it matters to the business
Educational institutions using Moodle face risk of unauthorized script execution that could lead to session hijacking, data theft, or unauthorized actions within the learning platform, though low exploit likelihood limits immediate operational disruption.
How an attack unfolds
An attacker with lesson-creation privileges supplies crafted ID values containing script payloads; the values are stored without proper escaping and later rendered unsanitized in the overview report, executing when viewed by teachers or administrators.
How to fix it
Upgrade Moodle to a version containing commit e8d03fdae4ec30a40cdc535c8e9e95f30604ec10, which adds proper sanitization of the ID numbers displayed in lesson reports.
How to confirm the fix worked
Confirm the patch commit is present in the deployed codebase; test by submitting script-containing IDs and verifying they are escaped or removed in generated reports.
Typical attack path
- Obtain or create an account with lesson management rights
- Insert malicious payloads into ID fields while building lessons
- Trigger generation of the lesson overview report
- Wait for a privileged user to view the report
- Leverage executed script for cookie theft, privilege escalation, or further platform abuse
How to detect it
Review lesson overview reports and associated database entries for unexpected script tags or encoded payloads; examine web server and application logs around report access times for anomalous input patterns.
What your security team should do
- Apply the referenced commit or newer release across all Moodle instances
- Audit existing lesson content for anomalous ID values
- Monitor report-generation access logs for unusual patterns
- Enforce least-privilege access for lesson creation roles
The record
ID numbers displayed in the lesson overview report required additional sanitizing to prevent a stored XSS risk.
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