CVE-2018-16482: mcstatic directory traversal vulnerability
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.66664%
CWE
Published
2/7/2019
Updated
9/12/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
mcstatic | npm | <= 0.0.20 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper path handling when processing URL paths. The advisory explicitly mentions directory traversal via appended slashes, which typically occurs when user-supplied paths are joined with a base directory without proper sanitization. In Node.js static servers, this logic is commonly found in the core request-serving function (often named 'serve'). The function would use path.join()
or similar methods without subsequent validation to ensure the resolved path remains within the intended directory. This matches the CWE-22 pattern and the described attack vector.