CVE-2019-18857 XSS in enshrined/svg-sanitize due to mishandled script and data values in attributes
An attacker can execute arbitrary JavaScript via crafted SVG attributes due to improper sanitization of whitespace in script values.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2019-18857?
CVE-2019-18857 is a high-severity cross-site scripting vulnerability in n/a, published on 11 Nov 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
darylldoyle svg-sanitizer before 0.12.0 mishandles script and data values in attributes, as demonstrated by unexpected whitespace such as in the javascript	:alert substring.
Weakness: CWE-79
Which versions are affected by CVE-2019-18857?
2 open source packages ship an affected version, including enshrined/svg-sanitize. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
enshrined/svg-sanitize Packagist | All versions | 0.12.0 |
enshrined/svg-sanitize Packagist | All versions | 0.12.0 |
Products include Svg-Sanitizer Project Svg-Sanitizer.
How do I fix CVE-2019-18857?
Upgrade enshrined/svg-sanitize to 0.12.0 or later.
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-2019-18857 being exploited?
There is no known exploitation of CVE-2019-18857 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-gf8j-v8x5-h9qp.