CVE-2021-20187
HIGH 7.2CVSS 3.1Moodle Arbitrary PHP code execution by site admins via Shibboleth configuration
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.
- Published
- 28 Jan 2021
- Last modified
- 17 Jun 2026
- Assigned by
- secalert@redhat.com
- NVD status
- Modified
- Weakness
- CWE-829CWE-94
- Also known as
- BIT-moodle-2021-20187GHSA-2jrm-gww7-wch2
- Sources
- NVDJSONOSV GHSA-2jrm-gww7-wch2JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.2 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.2 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.5 | AV:N/AC:L/Au:S/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | moodle | moodlecpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:* |
< 3.5.16 | 3.5.16 |
| NVD | moodle | moodlecpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:* |
>= 3.8.0, < 3.8.7 | 3.8.7 |
| NVD | moodle | moodlecpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:* |
>= 3.9.0, < 3.9.4 | 3.9.4 |
| NVD | moodle | moodlecpe:2.3:a:moodle:moodle:3.10.0:*:*:*:*:*:*:* |
= 3.10.0 | |
| OSV | Packagist | moodle/moodle | >= 3.5, < 3.5.16 | 3.5.16 |
| OSV | Packagist | moodle/moodle | >= 3.8, < 3.8.7 | 3.8.7 |
| OSV | Packagist | moodle/moodle | >= 3.9, < 3.9.4 | 3.9.4 |
| OSV | Packagist | moodle/moodle | >= 3.10, < 3.10.1 | 3.10.1 |
References
- https://moodle.org/mod/forum/discuss.php?d=417171 · Patch, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-20187 · ADVISORY
- https://github.com/moodle/moodle · PACKAGE
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 28 Jan 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 May 2022)