Miggo Logo

CVE-2015-1164: Open Redirect in serve-static

3.1

CVSS Score
3.1

Basic Information

EPSS Score
0.52907%
Published
8/31/2020
Updated
1/9/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
serve-staticnpm< 1.6.51.7.2
serve-staticnpm>= 1.7.0, < 1.7.21.7.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper path handling in directory redirect logic. When serve-static is mounted at root, requests like //www.google.com/%2e%2e trigger sendRedirect to set Location: //www.google.com/%2e%2e/. Browsers interpret '//' as a protocol-relative URL, enabling open redirects. The sendRedirect function's failure to validate if the normalized path represents an external target makes it the vulnerable component. This matches the PoC behavior and CWE-601 classification.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

V*rsions o* `s*rv*-st*ti*` prior to *.*.* ( or *.*.x prior to *.*.* ) *r* *****t** *y *n op*n r**ir**t vuln*r**ility on som* *rows*rs w**n *on*i*ur** to mount *t t** root *ir**tory. ## Proo* o* *on**pt * link to `*ttp://*x*mpl*.*om//www.*oo*l*.*om

Reasoning

T** vuln*r**ility st*ms *rom improp*r p*t* **n*lin* in *ir**tory r**ir**t lo*i*. W**n s*rv*-st*ti* is mount** *t root, r*qu*sts lik* `//www.*oo*l*.*om/%**%**` tri***r s*n*R**ir**t to s*t Lo**tion: `//www.*oo*l*.*om/%**%**/`. *rows*rs int*rpr*t '//' *