CVE-2019-12313 Cross-Site Scripting in shave
Cross-site scripting vulnerability in the Shave JavaScript library allows attackers to execute arbitrary scripts via mishandled output encoding.
- 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-2019-12313?
CVE-2019-12313 is a medium-severity cross-site scripting vulnerability in n/a, published on 24 May 2019. 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
XSS exists in Shave before 2.5.3 because output encoding is mishandled during the overwrite of an HTML element.
Weakness: CWE-79
Which versions are affected by CVE-2019-12313?
2 open source packages ship an affected version, including shave. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
shave npm | All versions | 2.5.3 |
shave npm | All versions | 2.5.3 |
Products include Dollarshaveclub Shave.
How do I fix CVE-2019-12313?
Upgrade shave to 2.5.3 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-12313 being exploited?
There is no known exploitation of CVE-2019-12313 in the wild and no public exploit code.
Sources
Also known as GHSA-gh4g-3gm9-5wrq.