CVE-2017-0931 Cross-Site Scripting in html-janitor

Medium 6.1 Published Updated

An XSS vulnerability in the html-janitor library allows attackers to execute arbitrary scripts via the clean() function.

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-0931?

CVE-2017-0931 is a medium-severity cross-site scripting vulnerability in HackerOne html-janitor 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

html-janitor node module suffers from a Cross-Site Scripting (XSS) vulnerability via clean() accepting user-controlled values.

Weakness: CWE-79

Which versions are affected by CVE-2017-0931?

2 open source packages ship an affected version, including html-janitor. It affects 1 product.

PackageAffectedFixed in
html-janitor npmAll versions2.0.3
html-janitor npmAll versions2.0.3

Products include Html-Janitor Project Html-Janitor.

How do I fix CVE-2017-0931?

Upgrade html-janitor to 2.0.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-2017-0931 being exploited?

There is no known exploitation of CVE-2017-0931 in the wild and no public exploit code.

Sources

Also known as GHSA-hfj4-96f7-6r5g.

Is CVE-2017-0931 in your software?

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

Check your SBOMs for free