CVE-2024-34007
NoneCVSS
—
EPSS
0.4%
Published
May 31, 2024
CISA due date
—
Cloudanix analysis
A missing security check in the multi-factor sign-out process could allow someone to force users off the system without their permission.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Theoretical
- Impact
- Denial Of Service
- Component
- Application
- Class
- CSRF
- Remediation
- Patch
- Effort
- Low
- Patch risk
- Low
What it actually does
The MFA logout endpoint lacks a CSRF token, permitting forged cross-site requests that terminate authenticated sessions without user consent or interaction.
Why it matters to the business
Unexpected session terminations can interrupt workflows, increase support volume, and erode user trust in the platform's reliability.
How an attack unfolds
An attacker creates a malicious webpage or link embedding an unauthenticated POST to the MFA logout URL; when an authenticated user visits the attacker-controlled resource, the browser automatically includes session cookies and executes the logout.
How to fix it
Upgrade moodle/moodle to the commit 143c2cd5bef1268751d58bbfc6c66c1d93cb9797 or a later release that adds the missing CSRF token to the MFA logout flow.
How to confirm the fix worked
Inspect the MFA logout request handler for the presence of a CSRF token check; replay the endpoint from an external origin after applying the fix and confirm the request is rejected.
Typical attack path
- Identify the unprotected MFA logout endpoint
- Craft a cross-site request that triggers logout without a valid token
- Host the payload on a site the victim is likely to visit
- Lure the authenticated user to the malicious resource
- Confirm session termination via subsequent access attempts
How to detect it
Examine web server access logs for POST requests to the MFA logout path that originate from external referrers or lack expected headers; correlate with user reports of abrupt logouts.
What your security team should do
- Apply the referenced commit or newer release across all Moodle instances
- Review web application firewall rules to block cross-origin requests to logout endpoints
- Enable logging of all MFA logout events with referrer data for anomaly detection
The record
The logout option within MFA did not include the necessary token to avoid the risk of users inadvertently being logged out via CSRF.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | moodle/moodle | 4.3.0 | 4.3.4 |
| Bitnami | moodle | 4.3.0 | 4.3.4 |
| 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.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