Miggo Logo

CVE-2017-16166: Directory Traversal in byucslabsix

7.5

CVSS Score
3.0

Basic Information

EPSS Score
0.67352%
Published
7/23/2018
Updated
9/12/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
byucslabsixnpm<= 0.0.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability arises from improper path resolution when handling user-supplied URLs. The example exploit uses '/../../../../../../../../../../etc/passwd' in the URL, which suggests the server directly uses req.url to construct filesystem paths. In Node.js, functions like path.join() or fs.readFile() would be involved in this process. If the server does not normalize the resolved path or check if it remains within the intended root directory (e.g., via path.resolve() followed by a startsWith() check), it becomes vulnerable. The PoC's behavior and advisory description align with this pattern, indicating the core request-handling logic is flawed.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*****t** v*rsions o* `*yu*sl**six` 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*

Reasoning

T** vuln*r**ility *ris*s *rom improp*r p*t* r*solution w**n **n*lin* us*r-suppli** URLs. T** *x*mpl* *xploit us*s '/../../../../../../../../../../*t*/p*ssw*' in t** URL, w*i** su***sts t** s*rv*r *ir**tly us*s `r*q.url` to *onstru*t *il*syst*m p*t*s.