Junglewise Threat Intelligence

CVE-2026-27738: Angular SSR open redirect via X-Forwarded-Prefix header

CVE-2026-27738 · Severity: medium · CVSS 4 · Published 2026-02-25

Vendors: Google.

Executive brief

Angular's server-side rendering (SSR) module is used to pre-render web applications on the server before sending them to browsers. An attacker can exploit incomplete URL validation in this module to trick users into visiting malicious websites. When the application is deployed behind a proxy that forwards the X-Forwarded-Prefix header, an attacker can inject a specially crafted header value that causes users to be redirected to an attacker-controlled domain, enabling phishing attacks and search engine poisoning.

Technical details

The vulnerability exists in Angular SSR's URL processing logic, which normalizes URL segments by stripping leading slashes but only removes a single slash. When an attacker provides an X-Forwarded-Prefix header value starting with three slashes (e.g., ///evil.com), Angular strips one slash, leaving //evil.com. This double-slash prefix is interpreted by modern browsers as a protocol-relative URL, causing redirects to attacker-controlled domains. The attack requires the application to use Angular SSR with routes that perform internal redirects, a proxy that passes X-Forwarded-Prefix without sanitization, and caching that doesn't vary on this header. Patches are available in versions 21.2.0-rc.1, 21.1.5, 20.3.17, and 19.2.21; a workaround involves sanitizing the header in server.ts before Angular processes the request.

Affected products

  • Google Angular SSR 19.0.0-next.0 through 19.2.20, 20.0.0-next.0 through 20.3.16, 21.0.0-next.0 through 21.1.4, 21.2.0-next.0 through 21.2.0-rc.0

Timeline

  • 2026-02-25: disclosed
  • 2026-02-25: patched: Patches released: 19.2.21, 20.3.17, 21.1.5, 21.2.0-rc.1

References