Miggo Logo

CVE-2018-16482: mcstatic directory traversal vulnerability

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.66664%
Published
2/7/2019
Updated
9/12/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
mcstaticnpm<= 0.0.20

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper path handling when processing URL paths. The advisory explicitly mentions directory traversal via appended slashes, which typically occurs when user-supplied paths are joined with a base directory without proper sanitization. In Node.js static servers, this logic is commonly found in the core request-serving function (often named 'serve'). The function would use path.join() or similar methods without subsequent validation to ensure the resolved path remains within the intended directory. This matches the CWE-22 pattern and the described attack vector.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

* s*rv*r *ir**tory tr*v*rs*l vuln*r**ility w*s *oun* on no** mo*ul* m*st*ti* <=*.*.** t**t woul* *llow *n *tt**k to ****ss s*nsitiv* in*orm*tion in t** *il* syst*m *y *pp*n*in* sl*s**s in t** URL p*t*.

Reasoning

T** vuln*r**ility st*ms *rom improp*r p*t* **n*lin* w**n pro**ssin* URL p*t*s. T** **visory *xpli*itly m*ntions *ir**tory tr*v*rs*l vi* *pp*n*** sl*s**s, w*i** typi**lly o**urs w**n us*r-suppli** p*t*s *r* join** wit* * **s* *ir**tory wit*out prop*r