CVE-2024-38275
High · 7.5CVSS
7.5
EPSS
0.4%
Published
Jun 18, 2024
CISA due date
—
Cloudanix analysis
A Moodle component that follows web redirects could accidentally send login credentials to the wrong website, potentially letting outsiders access accounts.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The cURL wrapper retained original request headers including HTTP Authorization when automatically following HTTP redirects, causing sensitive credential information to be transmitted to the redirect target URL.
Why it matters to the business
Organizations running Moodle may have inadvertently disclosed user or service credentials to untrusted third-party sites, increasing risk of account compromise or data exposure in learning management environments.
How an attack unfolds
An attacker crafts a request that triggers a redirect to a server they control; because the wrapper forwards the original Authorization header, the attacker receives valid credentials that can be used for further unauthorized access.
How to fix it
Update moodle/moodle to the commit c8c84b4af18d50224c17a4a3193e1374fec26625 or later; verify the cURL wrapper no longer forwards Authorization headers on redirects.
How to confirm the fix worked
Review the patched code at c8c84b4af18d50224c17a4a3193e1374fec26625; test by issuing an authenticated request that receives a redirect and confirm the Authorization header is stripped on the subsequent request.
Typical attack path
- Identify a Moodle instance performing authenticated cURL requests that follow redirects
- Supply a URL that returns an HTTP redirect to an attacker-controlled endpoint
- Capture the forwarded Authorization header on the attacker server
- Replay captured credentials against Moodle or other services to obtain unauthorized access
How to detect it
Examine web server and application logs for sequences of requests where an authenticated Moodle cURL call is followed by a redirect to an external domain; look for Authorization header values appearing in unexpected destination logs.
What your security team should do
- Apply the fixed commit immediately across all Moodle instances
- Audit recent logs for any requests containing redirects that may have carried Authorization headers
- Rotate any credentials that could have been exposed through this behavior
- Implement network egress controls to limit where Moodle can send authenticated requests
The record
The cURL wrapper in Moodle retained the original request headers when following redirects, 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.11 |
| Packagist | moodle/moodle | 4.2.0-beta | 4.2.8 |
| Packagist | moodle/moodle | 4.3.0-beta | 4.3.5 |
| Packagist | moodle/moodle | 4.4.0-beta | 4.4.1 |
| Bitnami | moodle | 0 | 4.1.11 |
| 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.8 |
| packagist | moodle/moodle | 4.3.0-beta | 4.3.5 |
| packagist | moodle/moodle | 4.4.0-beta | 4.4.1 |
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