Moodle vulnerable to stored Cross-site Scripting
Date: 2023-05
Affected: composer/moodle/moodle
Attack vector: xss
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2021-27131
CWE: CWE-79
CVSS: 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)

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.


Mitigations:

Architectural layers (MAESTRO):