Cloudanix VulnDB

CVE-2024-43432

Medium · 5.3

Moodle authorization headers preserved between "emulated redirects"

CVSS

5.3

EPSS

0.3%

Published

Nov 11, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

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

  1. Identify a Moodle feature that issues cURL requests with authorization headers and follows redirects
  2. Supply or trigger a redirect URL pointing to an attacker-controlled host
  3. Observe the request arriving at the attacker host containing the original authorization header
  4. 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