Angular URL validation bypass in server-side rendering
angular
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @angular/platform-server npm |
|
|
angular
| Product | Affected | Fixed in |
|---|---|---|
| @angular/platform-server npm |
|
|
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 20.3.33, 21.2.25, and 22.2.1, ServerPlatformLocation in Angular server-side rendering checks for protocol-relative URLs before WHATWG URL normalization. A request path containing a popping dot segment followed by multiple slashes can bypass the raw resolveUrl check and normalize to a pathname beginning with two slashes. When Angular SSR detects a mismatch with the router's final location, it can place that pathname in an HTTP Location header, causing a browser to navigate to an attacker-controlled origin. Affected applications use @angular/platform-server and @angular/ssr and either expose compatible parameter or child route shapes or pass user-controlled navigation targets through infrastructure that preserves the relevant dot segments or semicolons. Pure client-side SPAs are not affected. This issue is fixed in versions 20.3.33, 21.2.25, and 22.2.1.
From the CVE record · GitHub_M
Angular server-side rendering can turn a crafted request path into an HTTP redirect to an attacker-controlled origin. This affects applications using @angular/platform-server and @angular/ssr when compatible routes or infrastructure preserve the relevant path segments. Pure client-side SPAs are not affected.
Teams running Angular SSR should check @angular/platform-server versions before 20.3.33, from 21.0.0 to before 21.2.25, or from 22.0.0 to before 22.2.1.