CVE-2021-20279 Moodle contains Stored XSS via ID number user profile field
Attackers can inject malicious scripts via the ID number profile field, potentially stealing user sessions or executing code in Moodle.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-20279?
CVE-2021-20279 is a medium-severity cross-site scripting vulnerability in Fedoraproject Fedora, published on 15 Mar 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
The ID number user profile field required additional sanitizing to prevent a stored XSS risk in moodle before 3.10.2, 3.9.5, 3.8.8, 3.5.17.
Weakness: CWE-79
Which versions are affected by CVE-2021-20279?
9 open source packages ship an affected version, including moodle/moodle and moodle. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
moodle/moodle Packagist | From 3.10 | 3.10.2 |
moodle/moodle Packagist | From 3.10 | 3.10.2 |
moodle/moodle Packagist | From 3.5 | 3.5.17 |
moodle/moodle Packagist | From 3.5 | 3.5.17 |
moodle/moodle Packagist | From 3.8 | 3.8.8 |
moodle/moodle Packagist | From 3.8 | 3.8.8 |
3 more packages
moodle/moodle Packagist | From 3.9 | 3.9.5 |
moodle/moodle Packagist | From 3.9 | 3.9.5 |
moodle Bitnami | From 3.5.0 | 3.5.17, 3.8.8, 3.9.5, 3.10.2 |
Products include Fedoraproject Fedora, Moodle Moodle.
How do I fix CVE-2021-20279?
Upgrade moodle/moodle to a fixed version for your release line: 3.10.2, 3.5.17, 3.8.8 or 3.9.5.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2021-20279 being exploited?
There is no known exploitation of CVE-2021-20279 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as BIT-moodle-2021-20279, GHSA-h7h6-fwpv-ggvx, UBUNTU-CVE-2021-20279.