5.4medium
Moodle vulnerable to stored Cross-site Scripting
- Severity
- 5.4medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.69% (higher than 53% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-w2pm-fr62-jgv4BIT-MOODLE-2021-27131
Description
Moodle 3.10.1 is vulnerable to persistent/stored cross-site scripting (XSS) due to the improper input sanitization on the "Additional HTML Section" via "Header and Footer" parameter in /admin/settings.php. This vulnerability is leading an attacker to steal admin and all user account cookies by storing the malicious XSS payload in Header and Footer. NOTE: this is disputed by the vendor because the "Additional HTML Section" for "Header and Footer" can only be supplied by an administrator, who is intentionally allowed to enter unsanitized input (e.g., site-specific JavaScript).
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| moodle/moodle (Packagist) | up to 3.10.1 | GitHub Advisory Database |
| moodle moodle | 3.10.1 | NVD |
| moodle (Bitnami) | from 3.10.1 before 3.10.2 | Bitnami Vulnerability Database |
All scores
| GitHub | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| Bitnami Vulnerability Database | medium rating |
Classification
What each source says
CVE List
Moodle 3.10.1 is vulnerable to persistent/stored cross-site scripting (XSS) due to the improper input sanitization on the "Additional HTML Section" via "Header and Footer" parameter in /admin/settings.php. This vulnerability is leading an attacker to steal admin and all user account cookies by storing the malicious XSS payload in Header and Footer. NOTE: this is disputed by the vendor because the "Additional HTML Section" for "Header and Footer" can only be supplied by an administrator, who is intentionally allowed to enter unsanitized input (e.g., site-specific JavaScript).
GitHub Advisory Database
Moodle 3.10.1 is vulnerable to persistent/stored cross-site scripting (XSS) due to the improper input sanitization on the "Additional HTML Section" via "Header and Footer" parameter in /admin/settings.php. This vulnerability may lead an attacker to steal admin and all user account cookies by storing the malicious XSS payload in Header and Footer.
References
| https://github.com/moodle/moodle | package, product, web | |
| https://github.com/p4nk4jv/CVEs-Assigned/blob/master/Moodle-3.10.1-CVE-2021-27131.md | evidence, exploit, web | |
| https://docs.moodle.org/402/en/Risks | web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-27131 | advisory, web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-27131 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-w2pm-fr62-jgv4 changed 2024-02-16 | CC-BY-4.0 |
| NVD | CVE-2021-27131 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-MOODLE-2021-27131 changed 2026-09-08 | Apache-2.0 |