CVE-2021-20186
MEDIUM 5.4CVSS 3.1Moodle Cross-site Scripting
It was found in Moodle before version 3.10.1, 3.9.4, 3.8.7 and 3.5.16 that if the TeX notation filter was enabled, additional sanitizing of TeX content was required to prevent the risk of stored XSS.
- Published
- 28 Jan 2021
- Last modified
- 17 Jun 2026
- Assigned by
- secalert@redhat.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- BIT-moodle-2021-20186GHSA-h8m4-h385-qhqv
- Sources
- NVDJSONOSV GHSA-h8m4-h385-qhqvJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | LOW 2.1 | AV:N/AC:H/Au:S/C:P/I:N/A:N |
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.1 | 3.10.1 |
| OSV | Packagist | moodle/moodle | >= 3.10, < 3.10.1 | 3.10.1 |
| OSV | Packagist | moodle/moodle | >= 3.9, < 3.9.4 | 3.9.4 |
| OSV | Packagist | moodle/moodle | >= 3.8, < 3.8.7 | 3.8.7 |
| OSV | Packagist | moodle/moodle | >= 3.5, < 3.5.16 | 3.5.16 |
References
- https://moodle.org/mod/forum/discuss.php?d=417170 · Patch, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-20186 · 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:15 UTC · OSV: first stored (published 24 May 2022)