CVE-2021-30458 — parsoid
MEDIUMCVE-2021-30458 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in wikimedia/parsoid. A fix is available for wikimedia/parsoid — see the affected versions and patch details below.
Wikimedia Parsoid vulnerable to Cross-site Scripting (XSS)
EPSS Exploitation Probability
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
wikimedia/parsoid🐘wikimedia/parsoidReal-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
An issue was discovered in Wikimedia Parsoid before 0.11.1 and 0.12.x before 0.12.2. An attacker can send crafted wikitext that Utils/WTUtils.php will transform by using a <meta> tag, bypassing sanitization steps, and potentially allowing for XSS.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | wikimedia/parsoid | ≥ 0.12&&< 0.12.2 | 0.12.2composer require wikimedia/parsoid:^0.12.2 |
| 🐘Packagist | wikimedia/parsoid | all versions | 0.11.1composer require wikimedia/parsoid:^0.11.1 |
Affected Products
parsoidwikimediaDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for wikimedia/parsoid, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update wikimedia/parsoid to 0.12.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-30458 is resolved across your whole dependency graph.
Workarounds
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
Is CVE-2021-30458 in your dependencies?
Find it across Packagist, including transitive dependencies.