CVE-2017-16016 Cross-Site Scripting in sanitize-html

Medium 6.1 Published Updated

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.

PackageAffectedFixed in
sanitize-html npmAll versions1.11.4
sanitize-html npmAll versions1.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.

Sources

Also known as GHSA-xc6g-ggrc-qq4r, ROOT-APP-NPM-CVE-2017-16016.

Is CVE-2017-16016 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free