Miggo Logo

CVE-2022-25936: Servst vulnerable to Path Traversal

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.57481%
Published
1/30/2023
Updated
2/15/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
servstnpm< 2.0.32.0.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper path validation in the static file handler. The proof-of-concept demonstrates that paths like '/../public-isprivate' were accessible despite being outside the intended root directory. The key vulnerable code is shown in the Gist analysis where indexOf(root) check passes for sibling directories sharing root's prefix. This check occurs in the main request handling function (statics middleware) in index.js, which was modified in the patched commit to use stricter validation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

V*rsions o* t** p**k*** s*rvst ***or* *.*.* *r* vuln*r**l* to *ir**tory Tr*v*rs*l *u* to improp*r s*nitiz*tion o* t** *il*P*t* v*ri**l*.

Reasoning

T** vuln*r**ility st*ms *rom improp*r p*t* v*li**tion in t** st*ti* *il* **n*l*r. T** proo*-o*-*on**pt **monstr*t*s t**t p*t*s lik* '/../pu*li*-ispriv*t*' w*r* ****ssi*l* **spit* **in* outsi** t** int*n*** root *ir**tory. T** k*y vuln*r**l* *o** is s