{"id":"CVE-2026-44437","aliases":["GHSA-69xr-m8h6-h664"],"url":"https://o3.security/vulnerability/CVE-2026-44437","summary":"Angular SSR: Open Redirect and Request Steering via Encoded X-Forwarded-Prefix","details":"### Description\nA vulnerability exists in the `X-Forwarded-Prefix` header processing logic within Angular SSR. The internal validation mechanism fails to properly account for URL-encoded characters, specifically dots (`%2e%2e`). This allows an attacker to bypass security filters by injecting encoded path traversal sequences that are later decoded and utilized by the application logic.\nWhen an Angular SSR application is configured to trust proxy headers and is deployed behind a proxy that forwards the `X-Forwarded-Prefix` header without prior sanitization, an attacker can provide a payload such as `/%2e%2e/evil`.\n\nThe vulnerability manifests in two ways:\n- Open Redirect: The application processes a redirect (e.g., router `redirectTo`). The decoded traversal payload manipulates the Location header, forcing the browser to an unintended path or external domain.\n- Server-Side Request Steering: The manipulated prefix is used as the base path for server-side `HttpClient` requests. This causes the server to make requests to unintended internal paths or external endpoints.\n\n### Attack Preconditions\n- The application must use Angular SSR.\n- The application must perform internal redirects or use relative URLs in server-side `HttpClient` requests.\n- The upstream infrastructure (Reverse Proxy/CDN) must pass the `X-Forwarded-Prefix` header to the SSR process without stripping or sanitizing it.\n\n### Workarounds\nUntil the patch is applied, developers should manually sanitize the `X-Forwarded-Prefix` header in their `server.ts`. The workaround involves decoding the component to catch encoded traversal attempts before normalization:\n\n\n```ts\napp.use((req, res, next) => {\n  let prefix = req.headers['x-forwarded-prefix'];\n  if (Array.isArray(prefix)) prefix = prefix[0];\n\n  if (prefix) {\n    try {\n      // Decode the prefix to catch encoded characters like %2e (dots)\n      const decodedPrefix = decodeURIComponent(prefix);\n      \n      // Sanitize: remove traversal attempts and ensure a safe leading slash\n      req.headers['x-forwarded-prefix'] = decodedPrefix\n        .replace(/\\.\\./g, '')       // Remove any dot-dot sequences\n        .replace(/^[/\\\\]+/, '/');   // Ensure it starts with exactly one slash\n    } catch (e) {\n      // If decoding fails, remove the potentially malicious header entirely\n      delete req.headers['x-forwarded-prefix'];\n    }\n  }\n  next();\n});\n```\n### Configuring Trusted Proxy Headers\nBy default, Angular ignores all X-Forwarded-* headers. If your application is behind a trusted reverse proxy (like a load balancer) that sets these headers, you can configure Angular to trust them.\nYou can configure trustProxyHeaders when initializing the application engine:\n\n```ts\nconst appEngine = new AngularAppEngine({\n  // Trust specific headers\n  trustProxyHeaders: ['x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-prefix'], \n});\n\nconst nodeAppEngine = new AngularNodeAppEngine({\n  // Trust all X-Forwarded-* headers\n  trustProxyHeaders: true, \n});\n```\n\n### Patches\n- 22.0.0-next.7\n- 21.2.9\n- 20.3.25\n- 19.2.25\n\n### Resources\n\n- https://github.com/angular/angular-cli/pull/33031\n- https://angular.dev/best-practices/security#configuring-trusted-proxy-headers","published":"2026-05-13T21:23:59.260Z","modified":"2026-08-12T03:51:31.270941128Z","cvss":null,"epss":{"score":0.00203,"percentile":0.1047,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@angular/ssr","fixedVersion":"22.0.0-next.7"},{"ecosystem":"npm","name":"@angular/ssr","fixedVersion":"21.2.9"},{"ecosystem":"npm","name":"@angular/ssr","fixedVersion":"20.3.25"},{"ecosystem":"npm","name":"@angular/ssr","fixedVersion":"19.2.25"}],"fix":{"url":"https://github.com/angular/angular-cli/pull/33031","label":"angular/angular-cli#33031"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/44xxx/CVE-2026-44437.json"},{"type":"ADVISORY","url":"https://github.com/angular/angular-cli/security/advisories/GHSA-69xr-m8h6-h664"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44437"},{"type":"FIX","url":"https://github.com/angular/angular-cli/pull/33031"},{"type":"WEB","url":"https://angular.dev/best-practices/security#configuring-trusted-proxy-headers"},{"type":"PACKAGE","url":"https://github.com/angular/angular-cli"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:31.270941128Z"}}