Miggo Logo

CVE-2017-16146: Directory Traversal in mockserve

7.5

CVSS Score
3.0

Basic Information

EPSS Score
0.67352%
Published
7/23/2018
Updated
9/7/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
mockservenpm<= 2.0.6

Vulnerability Intelligence
Miggo AIMiggo AI

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

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*****t** v*rsions o* `mo*ks*rv*` 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*

Reasoning

T** vuln*r**ility st*ms *rom improp*r p*t* s*nitiz*tion w**n **n*lin* us*r-suppli** URLs. W*il* *x**t *o** isn't *v*il**l*, t** p*tt*rn m*t***s *ommon No**.js p*t* tr*v*rs*l vuln*r**iliti*s w**r*: *) R*qu*st URLs *r* *ir**tly m*pp** to *il*syst*m p*t