CVE-2018-16480 Tnantoka/public XSS Vulnerability

Medium 6.1 Published Updated

Attackers can execute malicious JavaScript in browsers via unsanitized file names in the public npm module.

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-2018-16480?

CVE-2018-16480 is a medium-severity cross-site scripting vulnerability in HackerOne public, published on 1 Feb 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

A XSS vulnerability was found in module public <0.1.4 that allows malicious Javascript code to run in the browser, due to the absence of sanitization of the file/folder names before rendering.

Weakness: CWE-79

Which versions are affected by CVE-2018-16480?

2 open source packages ship an affected version, including public. It affects 1 product.

PackageAffectedFixed in
public npmAll versions0.1.4
public npmAll versions0.1.4

Products include Public Project Public.

How do I fix CVE-2018-16480?

Upgrade public to 0.1.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-2018-16480 being exploited?

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

Sources

Also known as GHSA-649c-x44h-4q7v.

Is CVE-2018-16480 in your software?

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

Check your SBOMs for free