Title: Angular Router auxiliary outlets can exhaust memory during SSR · Issue #70932 · angular/angular · GitHub
Open Graph Title: Angular Router auxiliary outlets can exhaust memory during SSR · Issue #70932 · angular/angular
X Title: Angular Router auxiliary outlets can exhaust memory during SSR · Issue #70932 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description The processChildren() recognizes every outlet before mergeEmptyPathMatches() removes duplicate empty-path branches. Every snapshot created...
Open Graph Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description The processChildren() recognizes every outlet before mergeEmptyPathMatches() removes duplicate emp...
X Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description The processChildren() recognizes every outlet before mergeEmptyPathMatches() removes duplicate emp...
Opengraph URL: https://github.com/angular/angular/issues/70932
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular Router auxiliary outlets can exhaust memory during SSR","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nrouter\n\n### Is this a regression?\n\nNo\n\n### Description\nThe `processChildren()` recognizes every outlet before `mergeEmptyPathMatches()` removes duplicate empty-path branches. Every snapshot created along the way also copies the complete query parameter map:\n\n```ts\nObject.freeze({ ...this.urlTree.queryParams });\n```\n\nA small route shape is enough:\n\n```ts\nexport const routes: Routes = [\n {\n path: \"shop\",\n children: [{ path: \"\", children: [{ path: \"\", component: ShopPage }] }],\n },\n { path: \"**\", component: NotFound },\n];\n```\n\nFor example:\n\n```text\n/shop/(a:/()//b:/()//...)?a&b&c&...\n```\n\nWith 480 outlets and 1,377 distinct query names, the 7,873-byte request creates **1,926 snapshots** and copies **2,652,102 query properties**.\n\nAt 128 MiB:\n\n| Arm | Bytes | Outcome | Snapshots | Keys copied |\n| ------------------ | ----: | ------------: | --------: | ------------: |\n| Candidate | 7,873 | **5/5 fatal** | 1,926 | **2,652,102** |\n| Equal-byte control | 7,873 | 0/5 fatal | 1,926 | 3,852 |\n| Query only | 4,084 | 0/5 fatal | 6 | 8,262 |\n| Outlets only | 3,794 | 0/5 fatal | 1,926 | 0 |\n\nNeither dimension reaches the same result alone.\n\nI also tested 8 KiB and 16 KiB request lines at different empty-path depths with an async `canMatch`.\n\nThe values below are the **lowest concurrency that terminated the worker**. For example, `5` means four concurrent requests survived and five reached the OOM boundary.\n\n| Request | Depth | 256 MiB | 512 MiB | 1,024 MiB |\n| ------- | ----: | ------: | ------: | --------: |\n| 8 KiB | 2 | **2** | **5** | 6–16 |\n| | 3 | **2** | **3** | **6** |\n| | 4 | **1** | **3** | **5** |\n| 16 KiB | 2 | **1** | **2** | **4** |\n| | 3 | **1** | **2** | **3** |\n| | 4 | **1** | **1** | **2** |\n\nWithout the async guard, concurrency did not help. The largest heaps I could terminate with a **single request** were:\n\n| Depth | 8 KiB | 16 KiB |\n| ----: | ---------------: | ------------: |\n| 1 | survives 128 MiB | **256 MiB** |\n| 2 | **128 MiB** | **512 MiB** |\n| 3 | **128 MiB** | **512 MiB** |\n| 4 | **256 MiB** | **1,024 MiB** |\n\nDepth is application-controlled, not attacker-controlled.\n\nIn this we don't need to use numeric parameters or matrix parameters are involved. Angular 22.2.0 already contains #70717.\n\nSharing one frozen query map per recognition attempt changed the main 8 KiB / 128 MiB case from **5/5 fatal to 0/5** and reduced the copied properties from 2,652,102 to 1,377.\n\n### Please provide a link to a minimal reproduction of the bug\n\nSee POC https://github.com/SkyZeroZx/angular-router-aux-outlet-oom-lab","author":{"url":"https://github.com/SkyZeroZx","@type":"Person","name":"SkyZeroZx"},"datePublished":"2026-09-25T05:58:06Z","url":"https://github.com/angular/angular/issues/70932"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d719aaf6-04de-60aa-0f5f-15ebefbf3a31 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2F4:365BED:518D6B:72D22C:6AFDC9BA |
| html-safe-nonce | 3e64540d571431f617abef39f4a094082701510926f9639dab6485ef30259abf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkY0OjM2NUJFRDo1MThENkI6NzJEMjJDOjZBRkRDOUJBIiwidmlzaXRvcl9pZCI6Ijg3NjIxMTExNzgzMzI1NTU3MDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bf3673d26691efdf7239c8696cb7e0b643e2e12919d21e1e1ce88994389dff88 |
| hovercard-subject-tag | issue:5578831386 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/70932/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e819deadf1c74544961331b8d2369ed04eb15235ee2547274bb5c5f01eed82b9/angular/angular/issues/70932 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e819deadf1c74544961331b8d2369ed04eb15235ee2547274bb5c5f01eed82b9/angular/angular/issues/70932 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description The processChildren() recognizes every outlet before mergeEmptyPathMatches() removes duplicate emp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SkyZeroZx |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9ab00cc3b4fa90bbd3da70765dd38efc23cfa9d9b0930e41feea2bf67f60ecaf |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1b795ba060b92691fc16c5a12cf2bf95e83432b4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width