CVE-2021-20187
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.
Severity
HIGH
CVSS v3
7.2
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H · source nvd
Exploit chance (EPSS)
1.591%
chance of exploitation in the next 30 days
higher than 76.1% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-94: Improper Control of Generation of Code
Timeline
- 2021-01-28Published by the CNA18:30 UTC
- 2022-05-24GitHub advisory published (GHSA-2jrm-gww7-wch2)481 days after publication
Exploit and advisory records
GitHub advisory GHSA-2jrm-gww7-wch2, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| Packagist moodle/moodle | from 3.10 before 3.10.1 | 3.10.1 |
| Packagist moodle/moodle | from 3.5 before 3.5.16 | 3.5.16 |
| Packagist moodle/moodle | from 3.8 before 3.8.7 | 3.8.7 |
| Packagist moodle/moodle | from 3.9 before 3.9.4 | 3.9.4 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| moodle moodle | before 3.5.16fixed in 3.5.16from 3.8.0 before 3.8.7fixed in 3.8.7from 3.9.0 before 3.9.4fixed in 3.9.43.10.0no fix listed | 3.5.163.8.73.9.4not listed |
References
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2021-20187'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2021-20187'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2021-20187'curl 'https://api.contrastcyber.com/cve_products/CVE-2021-20187'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).