Skip to content
Source
Sign inSign up
TanStack/devtools

chore(deps): update dependency @angular/router to v21.2.25 [security] #570

Openrenovate[bot](GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/570/headopened View on GitHub

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

PackageChangeAgeConfidence
@angular/router (source)21.2.12 → 21.2.25ageconfidence

Angular Server-Side Rendering (SSR): Denial of Service via Numeric URL Matrix Parameters

CVE-2026-101896 / GHSA-ff3f-86qr-9cv3

More information

Details

A denial of service (DoS) vulnerability was identified in @angular/router when Server-Side Rendering (SSR) is enabled on Node.js (V8).

When @angular/router parses incoming request URLs, it extracts path segments, matrix parameters, and child outlets into plain JavaScript objects (Record<string, string>). When matrix parameter names or outlet names are numeric strings (such as /a;990;2522), the V8 JavaScript engine interprets them as array-indexed properties rather than named properties.

Under V8's internal property-storage heuristics, setting numeric keys on an initially empty object causes V8 to allocate a dense array backing store (HOLEY_ELEMENTS) sized to the maximum index rather than falling back to sparse dictionary storage. Specifically, assigning sequential or moderately large numeric keys (like 990 followed by 2522) causes V8 to allocate a contiguous backing store of ~2,522 pointers (~20 KB to 25 KB of heap) for a single 11-byte segment.

Because each segment in a URL path allocates its own independent parameters object, an attacker can craft URLs with repeated numeric matrix parameters to achieve an asymmetric memory amplification factor of approximately ~350x.

Impact

Successful exploitation allows an unauthenticated remote attacker to exhaust the Node.js old-space heap with modest request volume, terminating the SSR worker with an unrecoverable JavaScript heap out of memory fatal error and causing a Denial of Service.

  • High Amplification: A single 11-byte segment (/a;990;2522) consumes ~20 KB–25 KB of V8 heap.
  • Low Concurrency Required:
    • With 8 KB request paths (~740 segments, within default Nginx 8 KB buffer limits), as few as 12–22 concurrent requests crash a 256 MiB–512 MiB Node.js SSR worker.
    • With smaller 1 KB–2 KB request paths (~90–180 segments), a burst of ~50–100 concurrent requests achieves the same heap exhaustion.
  • 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.
Attack Preconditions & Vulnerable Configurations

An application is affected only if all of the following conditions are met:

  • SSR Enabled: The application runs in a Server-Side Rendering environment powered by Node.js / V8.
  • Direct Router Parsing: User-controlled request URLs are parsed by @angular/router during SSR.
  • No Reverse-Proxy Semicolon/Segment Filtering: Upstream reverse proxies (Nginx, Cloudflare, ALB) forward URLs containing semicolons (;) and multiple path segments without stripping or rejecting them.
Exploit Payload Example

An attacker sends concurrent HTTP requests with repeated numeric matrix parameters:

GET /a;990;2522/a;990;2522/a;990;2522/... HTTP/1.1
Host: example.com

Even with paths under 2 KB, overlapping requests during SSR will rapidly consume the V8 heap until the process crashes.

Patches

The issue is resolved by updating @angular/router to enforce V8 dictionary elements storage (setUrlDerivedKey) for numeric URL-derived keys (index >= 32). This prevents V8 from allocating oversized contiguous array backing stores while preserving route matching, parameter values, and component input bindings.

  • 22.2.0
  • 21.2.24
  • 20.3.32
Workarounds & Mitigations

If you cannot immediately upgrade to a patched version, apply one of the following mitigations at your edge or reverse proxy:

  1. Block or Sanitize Matrix Parameters at the Reverse Proxy: Configure your reverse proxy (e.g., Nginx, Cloudflare, or AWS WAF) to reject or strip semicolons (;) in request paths before forwarding requests to the Angular SSR service:
    # Nginx example: reject requests containing matrix parameters
    if ($uri ~* ";") {
        return 400;
    }
  2. Enforce Strict Path Segment Limits: Reject requests with excessive path depth (e.g., more than 20–30 segments).
  3. Increase Node.js Old Space: Increase --max-old-space-size (e.g., to 2048 or 4096 MB) to increase the concurrency threshold required to exhaust memory, though this does not fully eliminate the vulnerability under sustained traffic.

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: 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

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


@&#8203;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/router when Server-Side Rendering (SSR) is enabled on Node.js (V8).

During route recognition, @angular/router fails 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 as a:/(), 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 ActivatedRouteSnapshot trees, repeatedly execute canMatch guards and route resolvers, and allocate separate copies of route parameters and queryParams for 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 canMatch guards or resolvers, a single short request can also trigger repeated guard or resolver executions, increasing load on backend services and holding worker connections open.

  • Transient Allocation: Memory is released once route recognition completes; there is no persistent memory leak. The primary impact is process termination.
  • Client-side SPAs Unaffected: Client-side Angular applications running in the browser are not vulnerable, as browser memory consumption does not cross a security boundary.
  • Prerendering (SSG) Unaffected: Build-time prerendering does not process attacker-supplied request URLs.
Attack Preconditions & Vulnerable Configurations

An application is affected only if all of the following conditions are met:

  1. SSR Enabled: The application renders on demand on a Node.js / V8 server.
  2. Susceptible Route Configuration: At least one level of the route configuration contains either:
    • an empty-path (path: "") route (e.g., {path: "", component: ShopPage}), or
    • a route assigned to a named outlet (e.g., {path: "dashboard", children: [{path: ":id", outlet: "detail", component: DetailPanel}]}).
  3. Upstream Request Line Forwarding: Request lines reach the Node.js process without being rejected upstream by edge proxies. Node.js accepts request headers up to 16 KiB by default. Guard/resolver amplification requires only a short URL.
  4. Constrained Heap Size: Worker heaps are sized small enough relative to the request payload and concurrency (e.g., containers or serverless instances configured with 128 MiB–1 GiB).
Exploit Payload Examples

Against a configuration with empty-path (path: "") routes and query parameters:

GET /shop/(a:/()//b:/()//c:/()//...)?param1=value&param2=value... HTTP/1.1
Host: example.com

Against a configuration with named-outlet or sibling routes:

GET /dashboard/(detail:1//x:/(detail:1//x:/(...)//y:/(...))//y:/(...)) HTTP/1.1
Host: example.com
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.1
  • 21.2.25
  • 20.3.33

Versions 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:

  1. 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 ///( .

    • If your application does not use named (auxiliary) outlets in URLs, reject requests whose path contains ( or ) before Angular SSR handles the request.
    • If your application does use named outlets, reject requests whose path contains empty-path outlet sequences (:/( , (/ , or ///( ).

    Unlike URL length limits, this completely blocks both heap exhaustion and short-URL guard/resolver amplification:

    // server.ts (placed before Angular SSR handler)
    app.use((req, res, next) => {
      let pathname: string;
      try {
        pathname = decodeURI(req.url.split(/[?#]/, 1)[0]);
      } catch {
        res.status(400).send("Bad Request");
        return;
      }
    
      // Option A: If the app does not use named outlets in URLs, block all parenthesized groups:
      if (/[()]/.test(pathname)) {
        res.status(400).send("Bad Request");
        return;
      }
    
      // Option B: If the app uses named outlets, block only empty-path outlet groups:
      if (/:\/\(|\(\//\(|\/\/\/\(/.test(pathname)) {
        res.status(400).send("Bad Request");
        return;
      }
    
      next();
    });
  2. 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.

  3. Increase Node.js Old Space: Increasing --max-old-space-size raises the request size and concurrency required to exhaust memory, though it does not eliminate the issue.

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: 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

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


CVE-2026-111751 / GHSA-57xq-rjx2-v5xh

More information

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.

Starting in v21.2.0 (angular/angular#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.

When 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:

$$\text{Heap Retention} \approx (\text{Number of affected links}) \times (\text{Size of parsed query parameter map})$$

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.

  • 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.
  • 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.
Attack Preconditions & Vulnerable Configurations

An application is affected only if all of the following conditions are met:

  1. SSR Enabled: The application runs in a Server-Side Rendering environment powered by Node.js / V8.
  2. 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' }).
  3. 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).
  4. 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).
Exploit Payload Example

An attacker issues concurrent HTTP requests containing dense query parameters to an SSR page that renders multiple merged links:

GET /products?0&17&34&51&68&85&...&48042 HTTP/1.1
Host: example.com
Patches

The issue is resolved by removing persistent UrlTree retention from RouterLink (angular/angular#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.

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.1
  • 21.2.25

Versions 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.

Workarounds & Mitigations

If you cannot immediately upgrade to a patched version, apply one or more of the following mitigations:

  1. 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.

  2. 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:

    // 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();
    });
  3. 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 Score: 8.2 / 10 (High)
  • Vector String: 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

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

angular/angular (@​angular/router)

v21.2.25

Compare Source

platform-server
CommitTypeDescription
450af9c813fixreject protocol-relative paths in resolveUrl
router
CommitTypeDescription
4bc11a546bfixdo not copy URL-sized objects into every route snapshot
6489ca5d84fixreject duplicate outlets in production builds
a83f8119acfixrequire outlets to match a route before processing child segments
a131f77d92perfdo not retain UrlTree instances in RouterLink

v21.2.24

Compare Source

router
CommitTypeDescription
03872a80bcfixavoid dense elements allocation for numeric URL keys

v21.2.23

Compare Source

platform-server
CommitTypeDescription
fc2e8fbc0bfixupdate domino to latest version

v21.2.22

Compare Source

platform-server
CommitTypeDescription
5aa6d97debfixavoid stripping unicode whitespace during url resolution
73d8bbd27cfixupdate domino to latest version

v21.2.21

Compare Source

platform-browser
CommitTypeDescription
c19a36c2fbfixdisallow event handler attributes in Meta

v21.2.20

Compare Source

core
CommitTypeDescription
6afe6fa781fixsanitize host bindings on concrete hosts
http
CommitTypeDescription
fec5977df4fixmatch header values exactly when deleting
e33d69a71cfixpreserve immutability of materialized clones
caf616670ffixrun root interceptors in the terminal request chain

v21.2.19

Compare Source

compiler
CommitTypeDescription
e2660c3deefixdisallow i18n event attributes
7b884f585afixrestrict possible event handler check to property names longer than 2 characters
http
CommitTypeDescription
948a8d6831fixdistinguish repeated transfer cache params
9949dccce1fixenable xsrf for root-provided HttpClient
platform-server
CommitTypeDescription
f34a93c946fixupdate domino to latest version

v21.2.18

Compare Source

compiler-cli
CommitTypeDescription
8d22cc953bfixupdate babel dependencies to latest v7
core
CommitTypeDescription
6bcce117fbfixavoid caching missing locale data
5a693bafcdfixreject dynamic script host elements
http
CommitTypeDescription
91df739b80fixprevent caching of responses with Set-Cookie headers
service-worker
CommitTypeDescription
1804f73becfixpreserve referrer in asset requests
e86c31bf26fixpreserve referrer policy in asset requests

v21.2.17

Compare Source

Deprecations

platform-server
  • XHR support in @angular/platform-server is deprecated. Use standard fetch APIs instead.
common
CommitTypeDescription
86a56dc279fixLimits date format string length
d846326b07fixskip transfer cache for uncacheable HTTP traffic
bc55749698fixuse cryptographically secure SHA-256 for transfer cache key generation
compiler
CommitTypeDescription
dc9c99636dfixsanitize two-way properties
core
CommitTypeDescription
1523061137fixharden TransferState restoration against DOM clobbering
88832c84f8fixvalidate lowercase SVG animation attribute names (#&#8203;69269)
http
CommitTypeDescription
bcb1b7ea25fixpreserve empty referrer option in HttpRequest
a810a319d1fixRejects non-HTTP(S) URLs in JSONP requests
e245d40c4dfixskip transfer cache for fetch credentialed requests
platform-server
CommitTypeDescription
35510746b7fixharden platform location origin validation during SSR
13fb0afe93refactordeprecate ServerXhr (#&#8203;69255)
service-worker
CommitTypeDescription
b9d29381bbfixStrips sensitive headers on cross-origin redirects

v21.2.16

Compare Source

common
CommitTypeDescription
f6d8e642b0fixonly strip a literal /index.html suffix from URLs
compiler
CommitTypeDescription
ae1c8a1f7afixmove projection attributes into constants
core
CommitTypeDescription
3fd6897a67fixharden inherit definition feature against polluted prototypes
7e38336dc7fixuse Object.create(null) for LOCALE_DATA as a hardening measure
platform-server
CommitTypeDescription
66821c4ed5fixthrow on suspicious URLs and restrict protocol-relative URLs
d3170031b6fixupdate domino to latest version

v21.2.15

Compare Source

common
CommitTypeDescription
7f4ac78994fixadd upper bounds for digitsInfo
300f61feb3fixsanitize placeholder
compiler
CommitTypeDescription
0b07f47bd6fixnormalize tag names with custom namespaces in DomElementSchemaRegistry (#&#8203;68925)
eb1cbbf2ebfixprevent namespaced SVG [removed] elements from being stripped
cc1378d54bfixsanitize dynamic href and xlink:href bindings on SVG a elements (#&#8203;68925)
782e01594efixstrip namespaced SVG script elements during template compilation (#&#8203;68925)
core
CommitTypeDescription
ff12fe55acfixnormalize tag names in runtime i18n attribute security context lookup (#&#8203;68925)
e6fe77cc97fixsanitize meta selectors
daaf32937ffixsupport prefix-insensitive DOM schema lookups and compile-time i18n attribute validation (#&#8203;68925)
dada86e43dfixsynchronize core sanitization schema with compiler (#&#8203;68925)
http
CommitTypeDescription
582a417bd2fixexclude withCredentials requests from transfer cache
5c6d6df34bfixskip TransferCache for cookie-bearing requests by default
platform-server
CommitTypeDescription
37e8aadf87fixprevent SSRF bypasses via backslash URLs in HttpClient
72696e244efixsecure location and document initialization against SSRF and path hijack
service-worker
CommitTypeDescription
b8bd49341dfixPreserves explicit 'credentials: omit' in asset requests
ca32fc1000fixPreserves HTTP cache mode in asset group requests

v21.2.14

Compare Source

compiler
CommitTypeDescription
68282dff9ffixstrip namespaced SVG script elements during template compilation
core
CommitTypeDescription
c0f52272edfixdo not insert todo when migrating void @&#8203;Output
938a7f3eddfixmakes resource URL sanitizer lookup case-insensitive
0fb2724194fixreject script element as a dynamic component host
49113ac0effixvisit ICU expressions in signal migration schematics
router

| Commit | Type | Description

Important

✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

    1. Pushed6c2a749

    2. Pushed716d4ba

    3. Pushed9c16c7c

Sign in to join this conversation.