Miggo Logo

CVE-2017-16039: Directory Traversal in hftp

7.5

CVSS Score
3.0

Basic Information

EPSS Score
0.67352%
Published
7/24/2018
Updated
9/11/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
hftpnpm<= 0.0.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*****t** v*rsions o* `**tp` r*solv* r*l*tiv* *il* p*t*s, r*sultin* in * *ir**tory tr*v*rs*l vuln*r**ility. * m*li*ious **tor **n us* t*is vuln*r**ility to ****ss *il*s outsi** o* t** int*n*** *ir**tory root, w*i** m*y r*sult in t** *is*losur* o* priv

Reasoning

T** vuln*r**ility st*ms *rom improp*r p*t* r*solution w**n **n*lin* *TTP r*qu*sts. T** **visory *xpli*itly st*t*s t** s*rv*r r*solv*s r*l*tiv* p*t*s wit*out s*nitiz*tion. In No**.js s*rv*rs, t*is typi**lly o**urs in t** r*qu*st **n*l*r w**r* `r*q.url