CVE-2024-34004
NoneCVSS
—
EPSS
0.5%
Published
May 31, 2024
CISA due date
—
Cloudanix analysis
A configuration mistake combined with a Moodle flaw could let someone with certain editing rights read or run files they should not access on a shared server.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Data Exposure
- Component
- Application
- Class
- Path Traversal
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Path traversal in wiki module restore allows a privileged user with direct filesystem access outside the Moodle webroot to include arbitrary local files.
Why it matters to the business
In misconfigured shared hosting environments, an attacker could read sensitive files or execute code on the web server, potentially compromising multiple customer sites and leading to data breaches or service disruption.
How an attack unfolds
An attacker with wiki restore permissions crafts or uploads a malicious wiki backup containing path traversal sequences, restores it through the Moodle interface, and leverages direct web server access to trigger local file inclusion of attacker-controlled or sensitive files.
How to fix it
Upgrade Moodle to the commit e8d03fdae4ec30a40cdc535c8e9e95f30604ec10 or a later patched release. Review and correct shared hosting configurations to prevent cross-user content access.
How to confirm the fix worked
Verify the installed codebase contains commit e8d03fdae4ec30a40cdc535c8e9e95f30604ec10, re-test the wiki restore functionality with traversal payloads in an isolated environment, and audit hosting isolation controls.
Typical attack path
- Obtain a Moodle account with permission to restore wiki modules
- Prepare a wiki backup or module payload containing directory traversal sequences
- Restore the crafted wiki module via the Moodle interface
- Use direct filesystem or web server access outside the Moodle root to trigger inclusion of the traversed file
- Read sensitive data or execute included code
How to detect it
Review Moodle access and restore logs for unexpected wiki module restores, inspect web server logs for path traversal patterns during restore operations, and search filesystem for recently modified or included files outside expected Moodle directories.
What your security team should do
- Apply the patch to e8d03fdae4ec30a40cdc535c8e9e95f30604ec10 or newer immediately
- Audit all shared hosting deployments for cross-user directory access
- Restrict wiki restore permissions to trusted administrators only
- Monitor for unusual wiki restore activity and file inclusion attempts
The record
In a shared hosting environment that has been misconfigured to allow access to other users' content, a Moodle user with both access to restore wiki modules and direct access to the web server outside of the Moodle webroot could execute a local file include.
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