CVE-2024-43426
High · 7.5Moodle has arbitrary file read risk through pdfTeX
CVSS
7.5
EPSS
0.7%
Published
Nov 7, 2024
CISA due date
—
Cloudanix analysis
A flaw in the way Moodle handles certain math or document formatting can let attackers read private files stored on the server.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Insufficient input sanitization in the TeX notation filter allows path traversal that results in arbitrary file reads when pdfTeX processes attacker-controlled content.
Why it matters to the business
Attackers may read sensitive server files such as configuration data or user information, increasing risk of data exposure on any Moodle instance with pdfTeX available.
How an attack unfolds
An attacker submits specially crafted TeX notation through Moodle features that invoke pdfTeX; the missing sanitization permits directory traversal sequences that cause pdfTeX to read and return arbitrary files from the underlying filesystem.
How to fix it
Upgrade moodle/moodle to commit aea9770cfc7d003a737f4899489d1e3982efe9ac or later; disable pdfTeX integration if the update cannot be applied immediately.
How to confirm the fix worked
Confirm the deployed codebase contains commit aea9770cfc7d003a737f4899489d1e3982efe9ac; test the TeX filter with known traversal payloads to verify reads are now blocked.
Typical attack path
- Identify Moodle instance with pdfTeX/TeX Live enabled
- Craft malicious TeX input containing path traversal sequences
- Submit input via any interface that invokes the TeX notation filter
- Observe or exfiltrate contents of arbitrary files returned by pdfTeX
How to detect it
Search web server and application logs for TeX filter invocations containing path traversal patterns such as ../ or absolute paths; inspect pdfTeX process output or temporary files for unexpected file contents.
What your security team should do
- Apply the fixed commit aea9770cfc7d003a737f4899489d1e3982efe9ac immediately
- Review logs for any prior TeX filter usage that may indicate attempted exploitation
- Restrict or disable pdfTeX on instances that do not require it
- Monitor EPSS trend and re-evaluate risk if exploitation maturity changes
The record
A flaw was found in pdfTeX. Insufficient sanitizing in the TeX notation filter resulted in an arbitrary file read risk on sites where pdfTeX is available, such as those with TeX Live installed.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | moodle/moodle | 0 | 4.1.12 |
| Packagist | moodle/moodle | 4.2.0-beta | 4.2.9 |
| Packagist | moodle/moodle | 4.3.0-beta | 4.3.6 |
| Packagist | moodle/moodle | 4.4.0-beta | 4.4.2 |
| Bitnami | moodle | 4.1.0 | 4.1.12 |
| 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-beta | 4.2.9 |
| packagist | moodle/moodle | 4.3.0-beta | 4.3.6 |
| packagist | moodle/moodle | 4.4.0-beta | 4.4.2 |
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