Vulnerability GHSA-w739-gvwx-grc3

Medium Risk
MEDIUM RISK
CVSS Score: 6.0
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
2 hours ago
October 20, 2026 at 02:35 PM UTC
@angular/platform-server: Open Redirect via Protocol-Relative URLs in Server-Side Rendering (SSR)
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.32 and 21.0.0 - 21.2.24 and 22.0.0 - 22.2.0
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.32 and 21.0.0 - 21.2.24 and 22.0.0 - 22.2.0

Summary

@angular/platform-server: Open Redirect via Protocol-Relative URLs in Server-Side Rendering (SSR)

Details

An open redirect vulnerability was identified in @angular/platform-server when Server-Side Rendering (SSR) is enabled.

When Angular SSR renders an incoming request, URL resolution and platform navigation are managed by ServerPlatformLocation using resolveUrl (or parseUrl in v20). While resolveUrl rejected protocol-relative URLs whose raw string directly started with //, this check ran prior to WHATWG URL normalization.

When a request URL includes a popping dot-segment followed by multiple slashes (such as /.//evil.test or serialized from router route shapes like /.;/(//evil.test)), the input bypassed the initial urlStr.startsWith('//') check. Subsequent WHATWG URL parsing resolved the dot-segments and resulted in a pathname starting with // (//evil.test).

Consequently, ServerPlatformLocation stored pathname = '//evil.test'. When @angular/ssr detected a mismatch between the rendered URL and the router's final location state, it emitted the unnormalized pathname into the HTTP Location response header, producing an HTTP 302 redirect with Location: //evil.test, which browsers resolve as a protocol-relative navigation off-origin.

Impact

Successful exploitation allows an unauthenticated remote attacker to craft URLs that trick Angular SSR into redirecting users to an arbitrary external domain.

  • Bypasses Application-Level Guards: Common application-level validation routines (such as checking !returnUrl.startsWith('//') before invoking router.navigateByUrl) accept /.//evil.test or /.;/(//evil.test) as a safe relative path, allowing attackers to bypass redirect allowlists.
  • Client-side SPAs Unaffected: Pure client-side Angular applications (Single Page Applications without SSR) are not vulnerable, as ServerPlatformLocation is only utilized in server-side execution environments.

Attack Preconditions & Vulnerable Configurations

An application is affected if the following conditions are met:

  • SSR Enabled: The application runs in a Server-Side Rendering environment using @angular/platform-server and @angular/ssr.
  • Parameter Route Shapes: The router contains parameter routes with wildcard or child segments (e.g. /:tenant matching . and serializing secondary outlet groups (//evil.test) to /.//evil.test), or passes user-provided navigation targets (e.g. returnUrl).
  • Reverse Proxy Passthrough: Upstream reverse proxies (Nginx, Cloudflare, ALB) pass semicolons (;) or dot-segments without stripping or normalizing them.

Exploit Payload Example

An attacker sends a request targeting a route with parameters and child segments:

GET /.;/(//evil.test) HTTP/1.1
Host: example.com

Response:

HTTP/1.1 302 Found
Location: //evil.test

The client browser resolves //evil.test protocol-relatively and redirects the user away from example.com to evil.test.

Patches

The issue is resolved by updating resolveUrl (and parseUrl in v20) in @angular/platform-server to verify that the normalized URL pathname does not start with // when allowProtocolRelative is false.

  • 22.2.1
  • 21.2.25
  • 20.3.33

Workarounds & Mitigations

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

  1. Reject Paths with Dot-Segments Followed by Slashes: Configure your reverse proxy (e.g., Nginx, Cloudflare, AWS WAF) to block requests containing /.//, /..//, or /.;/:
    # Nginx example: reject suspicious path normalization sequences
    if ($request_uri ~* "(\n/\.\/|\/\.\;)") {
        return 400;
    }
    
  2. Sanitize Redirect Headers: Ensure edge proxies or API gateways rewrite or disallow protocol-relative (//) Location response headers originating from the SSR upstream.

Related Vulnerabilities

Other vulnerabilities affecting the same packages

High Risk
21 days ago
Angular SSR: Denial of Service (DoS) via Infinite Loop on Malformed DOCTYPE
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.30 and 21.0.0 - 21.2.22 and 22.0.0 - 22.1.5 GHSA-f67j-2jqw-jpq7
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.30 and 21.0.0 - 21.2.22 and 22.0.0 - 22.1.5 GHSA-f67j-2jqw-jpq7
High Risk
21 days ago
Angular SSR: XSS via Unescaped Processing Instruction (<?...?>) Nodes in Fallback Raw-Content Elements
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.29 and 21.0.0 - 21.2.21 and 22.0.0 - 22.1.3 GHSA-j3r3-mxqp-r2p4
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.29 and 21.0.0 - 21.2.21 and 22.0.0 - 22.1.3 GHSA-j3r3-mxqp-r2p4
High Risk
1 month ago
Angular: SSR XSS via Unescaped <template> Content Across DocumentFragment Boundaries in Fallback Raw-Content Elements
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.29 and 21.0.0 - 21.2.21 and 22.0.0 - 22.1.3 GHSA-v3p8-whq6-r5jg
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.29 and 21.0.0 - 21.2.21 and 22.0.0 - 22.1.3 GHSA-v3p8-whq6-r5jg
High Risk
1 month ago
Angular: SSRF and Cross-Origin Credential Disclosure via URL Resolution Discrepancy in SSR
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.29 and 21.0.0 - 21.2.21 and 22.0.0 - 22.1.3 GHSA-f6mr-pjwc-34m4
0.0.0-0 - 19.2.25 and 20.0.0 - 20.3.29 and 21.0.0 - 21.2.21 and 22.0.0 - 22.1.3 GHSA-f6mr-pjwc-34m4
High Risk
2 months ago
Angular SSR: Missing Fallback Raw-Content Serialization Escaping leads to Cross-Site Scripting (XSS)
0.0.0-0 - 20.3.26 and 21.0.0-next.0 - 21.2.18 and 22.0.0-next.0 - 22.0.6 GHSA-vpx6-8pjr-4g3v
0.0.0-0 - 20.3.26 and 21.0.0-next.0 - 21.2.18 and 22.0.0-next.0 - 22.0.6 GHSA-vpx6-8pjr-4g3v
View all vulnerabilities for these packages

Impacted packages

Timeline

Published
2 hours ago
October 20, 2026 at 02:35 PM UTC
Fixed (20.3.33)
19 days ago
September 30, 2026 at 05:54 PM UTC
Fixed (21.2.25)
19 days ago
September 30, 2026 at 06:20 PM UTC
Fixed (22.2.1)
Unknown
Unknown
Last Modified
2 hours ago
October 20, 2026 at 02:45 PM UTC