CVE-2017-16039: Directory Traversal in hftp
7.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67352%
CWE
Published
7/24/2018
Updated
9/11/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 |
---|---|---|---|
hftp | npm | <= 0.0.6 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper path resolution when handling HTTP requests. The advisory explicitly states the server resolves relative paths without sanitization. In Node.js servers, this typically occurs in the request handler where req.url
is concatenated with the root directory (e.g., via path.join
or path.resolve
) without subsequent validation to ensure the resolved path stays within the root. Functions like fs.readFile
are then called with this tainted path. While the exact code isn't available, this pattern matches the described vulnerability and is consistent with CWE-22.