Vulnerabilities in pkg:npm/@angular/router
PACKAGECVE-2026-111751 is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @angular/router libraries in the npm ecosystem. The issue involves denial of service via routerlink query parameter retention in server-side rendering (ssr). Remediation is available by upgrading affected packages to version 22.2.1, 21.2.25.
pkg:npm/@angular/router
Vulnerability advisories affecting package pkg:npm/@angular/router. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-57xq-rjx2-v5xh | CVE-2026-111751 | HIGH | @angular/router: Denial of Service via RouterLink Query Parameter Retention in Server-Side Rendering (SSR) |
| GHSA-62vg-58rm-qff7 | CVE-2026-111752 | HIGH | @angular/router: Denial of Service via Unmatched Empty-Path Outlet Route Matching in Server-Side Rendering (SSR) |
| GHSA-ff3f-86qr-9cv3 | CVE-2026-101896 | HIGH | Angular Server-Side Rendering (SSR): Denial of Service via Numeric URL Matrix Parameters |
CVE-2026-111751 at a Glance
How to Fix CVE-2026-111751
To remediate this vulnerability, upgrade all affected @angular/router dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @angular/router@22.2.1
npm install @angular/router@21.2.25
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @angular/router
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-111751, inspect your project dependencies using npm:
npm ls @angular/router
Analyze the terminal output to locate any version of @angular/router in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 22.2.1), your application is affected.
Note: The npm ls @angular/router command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In @angular/router, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-111751 Affected @angular/router Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@angular/router
|
npm |
≥ 22.0.0
< 22.2.1
|
22.2.1
|
|
@angular/router
|
npm |
≥ 21.2.0
< 21.2.25
|
21.2.25
|
References
Frequently Asked Questions
What is CVE-2026-111751?
Which @angular/router versions are affected?
What version fixes CVE-2026-111751?
Is @angular/router affected?
What CWE is associated with CVE-2026-111751?
How can I check npm dependencies for CVE-2026-111751?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-57xq-rjx2-v5xh",
"modified" : "2026-10-20T17:52:32Z",
"published" : "2026-10-20T17:52:32Z",
"aliases" : [ "CVE-2026-111751" ],
"summary" : "@angular/router: Denial of Service via RouterLink Query Parameter Retention in Server-Side Rendering (SSR)",
"details" : "A denial of service (DoS) vulnerability was identified in `@angular/router` when Server-Side Rendering (SSR) is enabled on Node.js (V8) and `RouterLink` directives are rendered with `queryParamsHandling: 'merge'` or `'preserve'`, configured either per link or globally via `defaultQueryParamsHandling`.\n\nStarting in v21.2.0 ([angular/angular#66181](https://github.com/angular/angular/pull/66181)), `RouterLink` internals were refactored to use signals, introducing a computed signal (`_urlTree`) that cached the returned `UrlTree` instance on the directive. Because each rendered link maintains an active `RouterLink` instance for the entire duration of the request lifecycle, the computed signal permanently pinned the `UrlTree` and its associated query parameter dictionary in the heap until the SSR response completed.\n\nWhen query parameter handling is set to `'merge'` or `'preserve'`, each link copies the incoming request's query parameters into its own `UrlTree`. During SSR, memory consumption scales multiplicatively:\n\n$$\\text{Heap Retention} \\approx (\\text{Number of affected links}) \\times (\\text{Size of parsed query parameter map})$$\n\nBecause parsed JavaScript objects and property dictionaries require substantially more heap space than the raw query string—particularly when property names trigger dense array allocations under V8 property-storage heuristics—an attacker can supply oversized query strings to amplify heap consumption by orders of magnitude per in-flight request.\n\n### Impact\n\nSuccessful exploitation allows an unauthenticated remote attacker to exhaust the Node.js old-space heap with modest concurrent request volume, terminating the SSR worker with an unrecoverable JavaScript heap out of memory fatal crash.\n\n* **Numeric Names Not Required:** Numeric query parameter names trigger larger V8 property-storage allocations (~558 KB per parsed dictionary in tests vs. ~197 KB for non-numeric equivalents), lowering the concurrency threshold needed for a crash. However, non-numeric query parameters also produce significant heap amplification and can exhaust worker memory with proportionally higher concurrency.\n* **Client-side SPAs Unaffected:** Pure client-side Angular applications (Single Page Applications without SSR) are not vulnerable, as local browser memory consumption does not cross a security boundary.\n\n### Attack Preconditions & Vulnerable Configurations\n\nAn application is affected only if all of the following conditions are met:\n\n1. **SSR Enabled:** The application runs in a Server-Side Rendering environment powered by Node.js / V8.\n2. **Merged or Preserved Query Parameters:** `RouterLink` elements rendered during SSR use `queryParamsHandling: 'merge'` or `'preserve'`, either bound explicitly on links or configured application-wide via `withRouterConfig({ defaultQueryParamsHandling: 'merge' })`.\n3. **Upstream Proxy Forwards Long Request Lines:** Reverse proxies or load balancers (e.g., Nginx, AWS ALB, Cloudflare) forward long query strings to the Node.js application rather than rejecting them at the edge. (For example, Nginx's default 8 KB `large_client_header_buffers` limit rejects 16 KB request lines unless explicitly increased).\n4. **Overlapping Renders:** Because retained memory is freed once each request completes, multiple concurrent requests must be processed simultaneously in the same Node.js worker instance (such as pages awaiting asynchronous data fetching, route resolvers, or external API calls during SSR).\n\n### Exploit Payload Example\n\nAn attacker issues concurrent HTTP requests containing dense query parameters to an SSR page that renders multiple merged links:\n\n```http\nGET /products?0&17&34&51&68&85&...&48042 HTTP/1.1\nHost: example.com\n```\n\n### Patches\n\nThe issue is resolved by removing persistent `UrlTree` retention from `RouterLink` ([angular/angular#70953](https://github.com/angular/angular/pull/70953)). `RouterLink` now tracks route dependencies directly in `reactiveHref` and discards intermediate `UrlTree` instances immediately after computing the serialized href string. The `urlTree` getter and click handlers compute `UrlTree` instances on demand.\n\nAs a result, intermediate query parameter maps are short-lived allocations collected during young-generation GC scavenges rather than remaining pinned in the heap for the lifetime of the request, restoring the memory profile of Angular 21.1 and earlier.\n\nPatched versions:\n* `22.2.1`\n* `21.2.25`\n\nVersions prior to 21.2.0 (including Angular 20.x LTS and 21.1.x) do not retain `UrlTree` instances in `RouterLink` and are not vulnerable to this issue.\n\n### Workarounds & Mitigations\n\nIf you cannot immediately upgrade to a patched version, apply one or more of the following mitigations:\n\n1. **Avoid 'merge' and 'preserve' on Server-Rendered Links:**\n Remove `defaultQueryParamsHandling: 'merge'` (or `'preserve'`) from global configuration. Explicitly bind only the specific query parameters each link requires (e.g., `[queryParams]=\"{ filter: filter() }\"`). Even on patched versions, this practice prevents unnecessary request-derived parameter propagation into generated DOM markup.\n\n2. **Limit Query String Length at Reverse Proxy or Middleware:**\n Configure your edge proxy, web application firewall (WAF), or reverse proxy to reject requests with excessively long query strings (e.g., exceeding 2,048 bytes).\n\n Alternatively, reject oversized query strings in Node.js before Angular SSR handles the request:\n ```ts\n // server.ts (before Angular SSR handler)\n app.use((req, res, next) => {\n const queryIndex = req.url.indexOf('?');\n if (queryIndex !== -1 && req.url.length - queryIndex > 2048) {\n res.status(414).send('URI Too Long');\n return;\n }\n next();\n });\n ```\n\n3. **Increase Node.js Old Space:**\n Increasing `--max-old-space-size` (e.g., to 2048 MB or 4096 MB) increases the memory headroom and the concurrency threshold required to exhaust memory, though it does not fully eliminate vulnerability under sustained traffic.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/router"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "22.0.0"
}, {
"fixed" : "22.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/router"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "21.2.0"
}, {
"fixed" : "21.2.25"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/angular/angular/security/advisories/GHSA-57xq-rjx2-v5xh"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/issues/70908"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/pull/70953"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/commit/319a3c4f3268f4f96ac4acdbb118737d2261e0be"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/angular/angular"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-20T17:52:32Z",
"nvd_published_at" : null
}
}