GHSA-w739-gvwx-grc3: Npm/@angular/platform-server vulnerability

Published Oct 20, 2026
·
Updated

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:

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

Response: http 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 # Nginx example: reject suspicious path normalization sequences if ($requesturi ~ "(\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.

Affected Software

4 affected componentsFixes available
npm/@angular/platform-server<=19.2.25
npm/@angular/platform-server>=20.0.0<20.3.33
20.3.33
npm/@angular/platform-server>=21.0.0<21.2.25
21.2.25
npm/@angular/platform-server>=22.0.0<22.2.1
22.2.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@angular/platform-server to a version that resolves this vulnerability.

    Fixed in 20.3.33
  2. Upgrade

    Upgrade npm/@angular/platform-server to a version that resolves this vulnerability.

    Fixed in 21.2.25
  3. Upgrade

    Upgrade npm/@angular/platform-server to a version that resolves this vulnerability.

    Fixed in 22.2.1
  4. Upgrade

    Upgrade @angular/platform-server to a version that resolves this vulnerability.

    Fixed in 20.3.33
  5. Upgrade

    Upgrade @angular/platform-server to a version that resolves this vulnerability.

    Fixed in 21.2.25
  6. Upgrade

    Upgrade @angular/platform-server to a version that resolves this vulnerability.

    Fixed in 22.2.1
  7. Configuration

    Reject requests containing dot-segments followed by slashes, including /.//, /..//, or /.;/.

    Nginx reverse proxy request URI filtering = return 400 for requests containing /.//, /..//, or /.;/
  8. Compensating control

    At edge proxies or API gateways, rewrite or disallow protocol-relative (//) Location response headers originating from the SSR upstream.

Event History

Oct 20, 2026
Advisory Published
via GitHub·02:35 PM
Data Sourced
via GitHub·02:35 PM
DescriptionWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203