CVE-2021-30458 Wikimedia Parsoid vulnerable to Cross-site Scripting (XSS)
An attacker can inject malicious scripts via crafted wikitext in Wikimedia Parsoid, bypassing sanitization to execute arbitrary code in the victim's browser.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-30458?
CVE-2021-30458 is a medium-severity cross-site scripting vulnerability in n/a, published on 9 Apr 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2021-30458?
4 open source packages ship an affected version, including wikimedia/parsoid. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
wikimedia/parsoid Packagist | All versions | 0.11.1 |
wikimedia/parsoid Packagist | All versions | 0.11.1 |
wikimedia/parsoid Packagist | From 0.12 | 0.12.2 |
wikimedia/parsoid Packagist | From 0.12 | 0.12.2 |
Products include Wikimedia Parsoid.
How do I fix CVE-2021-30458?
Upgrade wikimedia/parsoid to a fixed version for your release line: 0.11.1 or 0.12.2.
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-30458 being exploited?
There is no known exploitation of CVE-2021-30458 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2021-30458, GHSA-5pqx-77vf-85rw, UBUNTU-CVE-2021-30458.