GHSA-g8m7-qhv7-9h5x Path Traversal in serve-here.js
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.
| Package | Affected | Fixed in |
|---|---|---|
serve-here npm | All versions to 3.2.0 | None |
serve-here npm | All versions to 3.2.0 | None |
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.