Skip to content

Path Traversal in serve-here.js

High severity GitHub Reviewed Published Jul 5, 2019 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm serve-here (npm)

Affected versions

<= 3.2.0

Patched versions

None

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.

References

Reviewed Jun 14, 2019
Published to the GitHub Advisory Database Jul 5, 2019
Last updated Jan 9, 2023

Severity

High

EPSS score

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-g8m7-qhv7-9h5x

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.