GHSA-g8m7-qhv7-9h5x Path Traversal in serve-here.js

Not scored Published

Attackers can read arbitrary server files outside the served directory due to unsanitized URL handling in serve-here.js.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is GHSA-g8m7-qhv7-9h5x?

GHSA-g8m7-qhv7-9h5x is a path traversal vulnerability in serve-here, published on 5 Jul 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Versions of serve-here.js prior to 1.2.0 are vulnerable to Path Traversal. The package fails to sanitize URLs, allowing attackers to access server files outside of the served folder using relative paths.

Recommendation

Upgrade to version 1.2.0 or later.

Which versions are affected by GHSA-g8m7-qhv7-9h5x?

2 open source packages ship an affected version, including serve-here.

PackageAffectedFixed in
serve-here npmAll versions to 3.2.0None
serve-here npmAll versions to 3.2.0None

How do I fix GHSA-g8m7-qhv7-9h5x?

No fix has been published for GHSA-g8m7-qhv7-9h5x yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is GHSA-g8m7-qhv7-9h5x being exploited?

There is no known exploitation of GHSA-g8m7-qhv7-9h5x in the wild and no public exploit code.

Sources

Is GHSA-g8m7-qhv7-9h5x in your software?

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

Check your SBOMs for free