Miggo Logo

CVE-2021-22964: DOS and Open Redirect with user input

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.5754%
Published
10/12/2021
Updated
2/1/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
fastify-staticnpm>= 4.2.4, < 4.4.14.4.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key points:

  1. getRedirectUrl() lacked validation for protocol-relative paths (//) and error handling for URL parsing, enabling open redirects and DOS via malformed URLs.
  2. The route handler executed getRedirectUrl() without a try/catch block, letting parsing errors propagate as uncaught exceptions. The patch added input validation to getRedirectUrl and error handling in the route handler, confirming these were the vulnerable points.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t * r**ir**t vuln*r**ility in t** `**sti*y-st*ti*` mo*ul* *llows r*mot* *tt**k*rs to r**ir**t Mozill* *ir**ox us*rs to *r*itr*ry w**sit*s vi* * *ou*l* sl*s* `//` *ollow** *y * *om*in: `*ttp://lo**l*ost:****//*//youtu**.*om/%**%**%**%**%**`.

Reasoning

T** vuln*r**ility st*ms *rom two k*y points: *. **tR**ir**tUrl() l**k** v*li**tion *or proto*ol-r*l*tiv* p*t*s (//) *n* *rror **n*lin* *or URL p*rsin*, *n**lin* op*n r**ir**ts *n* *OS vi* m*l*orm** URLs. *. T** rout* **n*l*r *x**ut** **tR**ir**tUrl()