NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
MEDIUM severity

Moodle vulnerable to stored Cross-site ScriptingGHSA-w2pm-fr62-jgv4

MEDIUM

GHSA-w2pm-fr62-jgv4 is a medium-severity (CVSS 5.4) Cross-site Scripting (XSS) vulnerability in moodle/moodle. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.

Also known asBIT-moodle-2021-27131CVE-2021-27131
Published
Updated
Affected
1 pkg
Patched
See advisory
Exploits
1 known
Exploitation data as of Nov 9, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs53th percentile — riskier than 53% of all scored CVEsHighest risk
0.00%0.40%0.79%1.19%0.2%0.7%May 26Aug 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
🐘moodle/moodle

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

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 Packages

1 total
EcosystemPackageVulnerable rangeFix
🐘Packagistmoodle/moodleall versionsNo fix

Affected Products

1 product · 1 configurations
Application
moodlemoodle
1 version
3.10.1
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for moodle/moodle, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Remediation status

    The records we use list no patched version of moodle/moodle for GHSA-w2pm-fr62-jgv4. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.

  3. Mitigate without a patch

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is GHSA-w2pm-fr62-jgv4 in your dependencies?

Find it across Packagist, including transitive dependencies.

Moodle vulnerable to stored Cross-site Scripting