Code injection in moodle
Priority LOW 35CWE-94Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-94.
Summary
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.
Why it matters now
EPSS 0.01591 75th percentileScored 2026-11-07
Fix Fixed moodle/moodle (Packagist): 3.5.16, 3.8.7, 3.9.4 +1
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | moodle | moodle 3.10.1, moodle 3.9.4, moodle 3.8.7, moodle 3.5.16 | — | No fix listed | CNA |
| — | moodle/moodle (Packagist) | 3.5 to before 3.5.16 | 3.5.16 | Patch available | GHSA-2jrm-gww7-wch2 |
| — | moodle/moodle (Packagist) | 3.8 to before 3.8.7 | 3.8.7 | Patch available | GHSA-2jrm-gww7-wch2 |
| — | moodle/moodle (Packagist) | 3.9 to before 3.9.4 | 3.9.4 | Patch available | GHSA-2jrm-gww7-wch2 |
| — | moodle/moodle (Packagist) | 3.10 to before 3.10.1 | 3.10.1 | Patch available | GHSA-2jrm-gww7-wch2 |
- moodle Vendor— Affected moodle 3.10.1, moodle 3.9.4, moodle 3.8.7, moodle 3.5.16 Fixed in — No fix listed CNA
- moodle/moodle (Packagist) Vendor— Affected 3.5 to before 3.5.16 Fixed in 3.5.16 Patch available GHSA-2jrm-gww7-wch2
- moodle/moodle (Packagist) Vendor— Affected 3.8 to before 3.8.7 Fixed in 3.8.7 Patch available GHSA-2jrm-gww7-wch2
- moodle/moodle (Packagist) Vendor— Affected 3.9 to before 3.9.4 Fixed in 3.9.4 Patch available GHSA-2jrm-gww7-wch2
- moodle/moodle (Packagist) Vendor— Affected 3.10 to before 3.10.1 Fixed in 3.10.1 Patch available GHSA-2jrm-gww7-wch2
Remediation
- Fix · GHSA-2jrm-gww7-wch2 moodle/moodle (Packagist) Fixed in 3.5.16 Advisory →
- Fix · GHSA-2jrm-gww7-wch2 moodle/moodle (Packagist) Fixed in 3.8.7 Advisory →
- Fix · GHSA-2jrm-gww7-wch2 moodle/moodle (Packagist) Fixed in 3.9.4 Advisory →
- Fix · GHSA-2jrm-gww7-wch2 moodle/moodle (Packagist) Fixed in 3.10.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-20187
- 2026-10-03 Alias added: GHSA-2jrm-gww7-wch2
References
More Moodle vulnerabilities
- TI-2024-22468 moodle: unsafe direct use of $_SERVER['HTTP_REFERER'] in admin/tool/mfa/index.php CVSS 3.1CRITICAL 9.8
- TI-2021-14741 In Moodle, an SQL injection risk was identified in the library fetching a user's recent courses. CVSS 3.1CRITICAL 9.8
- TI-2024-29071 Moodle: remote code execution via calculated question types CVSS 3.1HIGH 8.1
- TI-2016-06653 Moodle 3.1.2 allows remote attackers to obtain sensitive information via unspecified… CVSS 3.1HIGH 7.5
- TI-2022-00259 SQL injection in moodle CVSS 3.1CRITICAL 9.8
- TI-2022-16116 Path traversal in Moodle CVSS 3.1HIGH 7.5
Sources
- CVE-2021-20187 · CVE Program
- CVE-2021-20187 · NVD
- FIRST EPSS
- GHSA-2jrm-gww7-wch2 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences