CVE-2017-16146: Directory Traversal in mockserve
7.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67352%
CWE
Published
7/23/2018
Updated
9/7/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
mockserve | npm | <= 2.0.6 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper path sanitization when handling user-supplied URLs. While exact code isn't available, the pattern matches common Node.js path traversal vulnerabilities where: 1) Request URLs are directly mapped to filesystem paths 2) No validation prevents directory traversal sequences 3) path.join()
or similar methods are used without resolving to absolute paths. The core vulnerable function would be the request handler responsible for converting URL paths to physical file paths, likely using the raw request path with Node's filesystem methods without proper security checks.