Angular: Denial of Service via Numeric URL Matrix Parameters in Server-Side Rendering (SSR)
angular · @angular router
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @angular/router npm |
|
|
angular · @angular router
| Product | Affected | Fixed in |
|---|---|---|
| @angular/router npm |
|
|
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 20.3.32, 21.2.24, and 22.2.0, the @angular/router URL parser stores numeric matrix parameter names and numeric outlet names as properties on initially empty JavaScript objects during Node.js server-side rendering. V8 can interpret these URL-derived keys as array indices and allocate dense backing stores sized to high numeric values, so repeated small path segments cause disproportionate per-segment heap consumption. An unauthenticated attacker can send overlapping requests containing repeated numeric matrix parameters when SSR is enabled, the router directly parses the request URL, and upstream proxies allow semicolons and multiple path segments, eventually exhausting the Node.js old-space heap and terminating the SSR worker. Pure client-side Angular applications are not affected. This issue is fixed in versions 20.3.32, 21.2.24, and 22.2.0.
From the CVE record · GitHub_M
During Node.js server-side rendering, the @angular/router URL parser can consume disproportionate heap memory when it handles numeric matrix parameter or outlet names. An unauthenticated attacker can send overlapping requests with repeated numeric matrix parameters to exhaust the heap and terminate the SSR worker, if the router directly parses request URLs and upstream proxies allow semicolons and multiple path segments. Pure client-side Angular applications are not affected.
Teams running server-side rendering with npm @angular/router versions >=22.0.0 <22.2.0, >=21.0.0 <21.2.24, >=20.0.0 <20.3.32, or <=19.2.25 should check their deployments.