CVE-2024-43432
Medium · 5.3Moodle authorization headers preserved between "emulated redirects"
CVSS
5.3
EPSS
0.3%
Published
Nov 11, 2024
CISA due date
—
Cloudanix analysis
Moodle could accidentally send login details meant for one site to a different site when following web redirects.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- Credential Exposure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The cURL wrapper in Moodle strips only HTTPAUTH and USERPWD headers during emulated redirects while preserving other original request headers, allowing HTTP authorization information to be forwarded to redirect target URLs.
Why it matters to the business
Organizations running Moodle risk unintended exposure of service account credentials or API tokens to external or attacker-controlled sites, increasing the chance of account compromise and downstream data access without requiring direct authentication bypass.
How an attack unfolds
An attacker configures a Moodle instance to follow a redirect chain that points to a server they control; when a request containing authorization headers is processed, the incomplete header stripping causes those credentials to be replayed to the attacker’s endpoint.
How to fix it
Upgrade moodle/moodle to commit aea9770cfc7d003a737f4899489d1e3982efe9ac; for the listed Ubuntu package, upgrade flashplugin-nonfree to 11.2.202.548ubuntu0.14.04.1. Verify the installed version matches a fixed release before re-enabling network features that use the cURL wrapper.
How to confirm the fix worked
Confirm the running Moodle codebase contains commit aea9770cfc7d003a737f4899489d1e3982efe9ac or later; test by issuing a request that triggers an emulated redirect and verify authorization headers are absent from the redirect target.
Typical attack path
- Identify a Moodle feature that issues cURL requests with authorization headers and follows redirects
- Supply or trigger a redirect URL pointing to an attacker-controlled host
- Observe the request arriving at the attacker host containing the original authorization header
- Replay captured credentials against the intended service to obtain unauthorized access
How to detect it
Inspect Moodle web server and cURL debug logs for requests containing Authorization headers directed at unexpected redirect targets; correlate with external network logs showing credential-bearing traffic leaving the Moodle host.
What your security team should do
- Apply the listed fixed commit or package version immediately given the credential-exposure nature of the flaw
- Audit all configured external services and API tokens used by Moodle to rotate any that may have been sent to unintended hosts
- Review Moodle HTTP request logs for redirect targets outside expected domains
The record
A flaw was found in moodle. The cURL wrapper in Moodle strips HTTPAUTH and USERPWD headers during emulated redirects, but retains other original request headers, so HTTP authorization header information could be unintentionally sent in requests to redirect URLs.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | moodle/moodle | 0 | 4.1.12 |
| Packagist | moodle/moodle | 4.2.0 | 4.2.9 |
| Packagist | moodle/moodle | 4.3.0 | 4.3.6 |
| Packagist | moodle/moodle | 4.4.0 | 4.4.2 |
| Bitnami | moodle | 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 | 4.2.9 |
| packagist | moodle/moodle | 4.3.0 | 4.3.6 |
| packagist | moodle/moodle | 4.4.0 | 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