CVE-2017-16016 Cross-Site Scripting in sanitize-html
Attackers can execute arbitrary scripts via XSS if non-text tags are allowed in the sanitize-html library configuration.
- 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-2017-16016?
CVE-2017-16016 is a medium-severity cross-site scripting vulnerability in HackerOne sanitize-html node module, published on 4 Jun 2018. 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
Sanitize-html is a library for scrubbing html input of malicious values. Versions 1.11.1 and below are vulnerable to cross site scripting (XSS) in certain scenarios: If allowed at least one nonTextTags, the result is a potential XSS vulnerability.
Weakness: CWE-79
Which versions are affected by CVE-2017-16016?
2 open source packages ship an affected version, including sanitize-html. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
sanitize-html npm | All versions | 1.11.4 |
sanitize-html npm | All versions | 1.11.4 |
Products include Punkave Sanitize-Html.
How do I fix CVE-2017-16016?
Upgrade sanitize-html to 1.11.4 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-2017-16016 being exploited?
There is no known exploitation of CVE-2017-16016 in the wild and no public exploit code.
Other vulnerabilities in HackerOne sanitize-html node module
Sources
Also known as GHSA-xc6g-ggrc-qq4r, ROOT-APP-NPM-CVE-2017-16016.