CVE-2026-111751: @angular/router Denial of Service via RouterLink Query Parameter Retention in SSR
Summary
CVE-2026-111751: 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'... Affects @angular/router across 2 version ranges.
>= 21.2.0, < 21.2.25
>= 22.0.0, < 22.2.1
Fixed in 21.2.25 or 22.2.1, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @angular/router package is a core component of the Angular framework, enabling developers to create single-page applications with routing capabilities. It allows for the management of navigation between different views or components in an Angular application. The package supports various features, including lazy loading, route guards, and parameterized routes. However, a vulnerability has been identified that affects its performance and stability when used in Server-Side Rendering (SSR) environments.
Vulnerability Detail
A denial of service (DoS) vulnerability exists in @angular/router when SSR is enabled on Node.js and RouterLink directives are rendered with queryParamsHandling set to 'merge' or 'preserve'. This vulnerability arises from the way RouterLink retains a computed signal that caches the UrlTree instance, leading to excessive memory consumption during concurrent requests. An attacker can exploit this by sending oversized query strings, causing the Node.js worker to exhaust its memory and crash. The vulnerability is particularly severe due to the potential for unauthenticated remote attackers to disrupt service with modest request volumes, resulting in an unrecoverable JavaScript heap out of memory error.
How To Fix
Latest published version: 22.2.3 as of 22 Oct 2026
npm install @angular/router@22.2.3
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 21.2.0, < 21.2.2521.2.25npm install @angular/router@21.2.25 -
>= 22.0.0, < 22.2.122.2.1npm install @angular/router@22.2.1
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
If immediate upgrading is not feasible, consider implementing the following workarounds:
-
Avoid using 'merge' and 'preserve' on server-rendered links. Remove defaultQueryParamsHandling: 'merge' or 'preserve' from global configuration and bind only the specific query parameters each link requires, for example: [queryParams]="{ filter: filter() }"
-
Limit query string length at the reverse proxy or middleware level. Configure your edge proxy to reject requests with excessively long query strings. For example, in your Node.js server, you can add the following middleware:
// server.ts (before Angular SSR handler)
app.use((req, res, next) => {
const queryIndex = req.url.indexOf('?');
if (queryIndex !== -1 && req.url.length - queryIndex > 2048) {
res.status(414).send('URI Too Long');
return;
}
next();
});
- Increase Node.js old space size by using the --max-old-space-size flag, e.g., --max-old-space-size=2048.
Conclusion
The CVE-2026-111751 vulnerability in the @angular/router package poses a significant risk to applications using Server-Side Rendering. It allows for denial of service through excessive memory consumption due to improper handling of query parameters. Immediate action is recommended to update to patched versions or implement workarounds to mitigate the risk.
See every vulnerability recorded for @angular/router →
FAQ
CVE-2026-111751 is a vulnerability in the @angular/router package that can lead to denial of service in applications using Server-Side Rendering.
If your application uses SSR with @angular/router and the affected query parameter handling settings, it may be susceptible to memory exhaustion attacks, causing crashes.
Versions of @angular/router starting from 21.2.0 up to 22.2.0 are affected. The vulnerability is fixed in versions 22.2.1 and 21.2.25.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application without signup at Vulert Scanner.
The CVSS score of this vulnerability is 8.2, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for @angular/router.