Repository navigation
chore(deps): update dependency @angular/router to v22.2.1 [security] - autoclosed - #275
Closed
renovate[bot] wants to merge 1 commit into
Closed
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
22.2.0→22.2.1@angular/router: Denial of Service via Unmatched Empty-Path Outlet Route Matching in Server-Side Rendering (SSR)
CVE-2026-111752 / GHSA-62vg-58rm-qff7
More information
Details
A denial of service (DoS) vulnerability was identified in
@angular/routerwhen Server-Side Rendering (SSR) is enabled on Node.js (V8).During route recognition,
@angular/routerfails to validate whether an auxiliary outlet segment in the URL matches a route configured for that specific outlet name. Because unconfigured empty-path outlet groups (such asa:/(),x:/(...), or///(...)) are not rejected during matching, the router repeatedly re-evaluates the route configuration against each arbitrary outlet segment provided in the URL.When a request URL contains multiple arbitrary empty-path outlet segments, this improper matching forces the router to instantiate duplicate
ActivatedRouteSnapshottrees, repeatedly executecanMatchguards and route resolvers, and allocate separate copies of route parameters andqueryParamsfor each unconfigured outlet.An unauthenticated remote attacker can exploit this behavior by sending requests with crafted outlet segments to exhaust the Node.js memory heap or overwhelm CPU resources, leading to SSR worker termination and service disruption.
Impact
Successful exploitation allows an unauthenticated remote attacker to exhaust the Node.js heap with a single crafted request or a small number of concurrent requests, terminating the SSR worker process with a fatal JavaScript heap out-of-memory crash. When the matched routes declare
canMatchguards or resolvers, a single short request can also trigger repeated guard or resolver executions, increasing load on backend services and holding worker connections open.Attack Preconditions & Vulnerable Configurations
An application is affected only if all of the following conditions are met:
path: "") route (e.g.,{path: "", component: ShopPage}), or{path: "dashboard", children: [{path: ":id", outlet: "detail", component: DetailPanel}]}).Exploit Payload Examples
Against a configuration with empty-path (
path: "") routes and query parameters:Against a configuration with named-outlet or sibling routes:
Patches
The issue is resolved in angular/angular#71055. The router now requires every child outlet segment group to match a route configured for its target outlet before unwrapping child segments or completing a match, and prevents unconfigured empty-path outlet groups from matching routes declared for other outlets.
Patched versions:
22.2.121.2.2520.3.33Versions prior to v20 are also affected but are no longer supported and will not receive a patch.
Workarounds & Mitigations
If you cannot immediately upgrade to a patched version, apply one or more of the following mitigations:
Reject Parenthesized or Empty-Path Outlet URLs in Middleware or WAF (Recommended):
In
@angular/router, auxiliary outlet groups in a URL always use parentheses(...), and empty-path outlet groups in a URL always take the form:/(,(/, or///(.(or)before Angular SSR handles the request.:/(,(/, or///().Unlike URL length limits, this completely blocks both heap exhaustion and short-URL guard/resolver amplification:
Limit URL Length at Reverse Proxy or Middleware:
Configure your edge proxy, web application firewall (WAF), or reverse proxy to reject requests with excessively long URLs (e.g., exceeding 2,048 bytes). The outlet portion of the payload is in the path, so limit the full request target, not only the query string. This reduces, but does not eliminate, guard/resolver amplification, which requires only a short URL.
Increase Node.js Old Space:
Increasing
--max-old-space-sizeraises the request size and concurrency required to exhaust memory, though it does not eliminate the issue.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
@angular/router: Denial of Service via RouterLink Query Parameter Retention in Server-Side Rendering (SSR)
CVE-2026-111751 / GHSA-57xq-rjx2-v5xh
More information
Details
A denial of service (DoS) vulnerability was identified in
@angular/routerwhen Server-Side Rendering (SSR) is enabled on Node.js (V8) andRouterLinkdirectives are rendered withqueryParamsHandling: 'merge'or'preserve', configured either per link or globally viadefaultQueryParamsHandling.Starting in v21.2.0 (angular/angular#66181),
RouterLinkinternals were refactored to use signals, introducing a computed signal (_urlTree) that cached the returnedUrlTreeinstance on the directive. Because each rendered link maintains an activeRouterLinkinstance for the entire duration of the request lifecycle, the computed signal permanently pinned theUrlTreeand its associated query parameter dictionary in the heap until the SSR response completed.When query parameter handling is set to
'merge'or'preserve', each link copies the incoming request's query parameters into its ownUrlTree. During SSR, memory consumption scales multiplicatively:Because 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.
Impact
Successful 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.
Attack Preconditions & Vulnerable Configurations
An application is affected only if all of the following conditions are met:
RouterLinkelements rendered during SSR usequeryParamsHandling: 'merge'or'preserve', either bound explicitly on links or configured application-wide viawithRouterConfig({ defaultQueryParamsHandling: 'merge' }).large_client_header_bufferslimit rejects 16 KB request lines unless explicitly increased).Exploit Payload Example
An attacker issues concurrent HTTP requests containing dense query parameters to an SSR page that renders multiple merged links:
Patches
The issue is resolved by removing persistent
UrlTreeretention fromRouterLink(angular/angular#70953).RouterLinknow tracks route dependencies directly inreactiveHrefand discards intermediateUrlTreeinstances immediately after computing the serialized href string. TheurlTreegetter and click handlers computeUrlTreeinstances on demand.As 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.
Patched versions:
22.2.121.2.25Versions prior to 21.2.0 (including Angular 20.x LTS and 21.1.x) do not retain
UrlTreeinstances inRouterLinkand are not vulnerable to this issue.Workarounds & Mitigations
If you cannot immediately upgrade to a patched version, apply one or more of the following mitigations:
Avoid 'merge' and 'preserve' on Server-Rendered Links:
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.Limit Query String Length at Reverse Proxy or Middleware:
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).
Alternatively, reject oversized query strings in Node.js before Angular SSR handles the request:
Increase Node.js Old Space:
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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
angular/angular (@angular/router)
v22.2.1Compare Source
common
compiler
compiler-cli
core
http
reportProgressofhttpResourceasreportDownloadProgressplatform-server
router
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.