Title: Angular SSR route-policy confusion can expose client-only data under public cache headers · Issue #33555 · angular/angular-cli · GitHub
Open Graph Title: Angular SSR route-policy confusion can expose client-only data under public cache headers · Issue #33555 · angular/angular-cli
X Title: Angular SSR route-policy confusion can expose client-only data under public cache headers · Issue #33555 · angular/angular-cli
Description: Description Angular SSR can select server-route metadata from one route while Angular Router renders a different route when the request URL contains certain ambiguous path forms. Example: /profile; /profile//public In both cases, a route...
Open Graph Description: Description Angular SSR can select server-route metadata from one route while Angular Router renders a different route when the request URL contains certain ambiguous path forms. Example: /profile;...
X Description: Description Angular SSR can select server-route metadata from one route while Angular Router renders a different route when the request URL contains certain ambiguous path forms. Example: /profile;...
Opengraph URL: https://github.com/angular/angular-cli/issues/33555
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular SSR route-policy confusion can expose client-only data under public cache headers","articleBody":"### Description\n\nAngular SSR can select server-route metadata from one route while Angular Router renders a different route when the request URL contains certain ambiguous path forms.\n\nExample:\n\n```text\n/profile;\n/profile//public\n```\n\nIn both cases, a route configured as `RenderMode.Client` can be unexpectedly rendered on the server while inheriting public cache headers from another `ServerRoute`.\n\n### Minimal Reproduction\n\n\n### Minimal configuration\n\n```ts\nimport { RenderMode, ServerRoute } from '@angular/ssr';\n\nexport const serverRoutes: ServerRoute[] = [\n {\n path: 'profile',\n renderMode: RenderMode.Client,\n headers: {\n 'Cache-Control': 'private, no-store',\n },\n },\n {\n path: 'profile/public',\n renderMode: RenderMode.Server,\n headers: {\n 'Cache-Control': 'public, max-age=300',\n },\n },\n {\n path: '**',\n renderMode: RenderMode.Server,\n headers: {\n 'Cache-Control': 'public, max-age=300',\n },\n },\n];\n```\n\nThe `/profile` component reads a benign request-derived marker through the SSR `REQUEST` token.\n\n### Steps to reproduce\n\nRequest the normal client-only route:\n\n```bash\ncurl -i \\\n -H 'Cookie: session=PRIVATE_VALUE' \\\n http://localhost:4000/profile\n```\n\nThe initial HTML does not contain the request-derived value.\n\nRequest either crafted path:\n\n```bash\ncurl -i \\\n -H 'Cookie: session=PRIVATE_VALUE' \\\n 'http://localhost:4000/profile;'\n```\n\n```bash\ncurl -i \\\n -H 'Cookie: session=PRIVATE_VALUE' \\\n http://localhost:4000/profile//public\n```\n\n### Actual behavior\n\nThe crafted requests can:\n\n- render the `/profile` component on the server;\n- expose request-derived data in the initial HTML;\n- apply `Cache-Control: public` metadata belonging to another server route.\n\n### Expected behavior\n\nThe route used to select `renderMode`, status, and response headers must always correspond to the route whose body is rendered.\n\nA route configured as `RenderMode.Client` should not be server-rendered through an alternative URL representation.\n\n\n\n### Your Environment\n\n```text\nAngular 22.X\n```\n\n### Anything else relevant?\n\nThis was previously reported at https://issuetracker.google.com/u/1/issues/518988455\n","author":{"url":"https://github.com/SkyZeroZx","@type":"Person","name":"SkyZeroZx"},"datePublished":"2026-07-12T22:42:45Z","url":"https://github.com/angular/angular-cli/issues/33555"}
| 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:e09323e4-5883-a140-6401-b032ae8c8f50 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E3AA:4141:34CE72:4C1A34:6AFDC8A6 |
| html-safe-nonce | c0e33091a37e09d6afff646fffb23ae22cb6b4dfcf002218f60993753048ad80 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0FBOjQxNDE6MzRDRTcyOjRDMUEzNDo2QUZEQzhBNiIsInZpc2l0b3JfaWQiOiI1NjAxMzM2Mjk3MjgxOTMxNDMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c1f6b0fcc7244558d5b05055d272f5c6a03f17efbc6ae6c4110f16dde27f6d8d |
| hovercard-subject-tag | issue:4869063512 |
| 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-cli/33555/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3d1f402b6ba9a16bc291b6f4b3e04288224674df6cfe589cf30c00754cde1195/angular/angular-cli/issues/33555 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3d1f402b6ba9a16bc291b6f4b3e04288224674df6cfe589cf30c00754cde1195/angular/angular-cli/issues/33555 |
| og:image:alt | Description Angular SSR can select server-route metadata from one route while Angular Router renders a different route when the request URL contains certain ambiguous path forms. Example: /profile;... |
| 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-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| 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