Angular
Angular: SSRF via Hostname Hijacking in @angular/platform-server
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.0-next.12, 21.2.13, 20.3.21, and 19.2.22, a Server-Side Request Forgery (SSRF) vulnerability exists in @angular/platform-server. The issue stems from how the server-side rendering (SSR) engine processes the request URL provided to the rendering entry points. When an absolute-form URL (e.g., http://evil.com) is passed to the rendering engine, the internal ServerPlatformLocation can be manipulated into adopting the attacker-controlled domain as the "current" hostname. Consequently, any relative HttpClient requests or PlatformLocation.hostname references are redirected to the attacker controlled server, potentially exposing internal APIs or metadata services. This vulnerability is fixed in 22.0.0-next.12, 21.2.13, 20.3.21, and 19.2.22.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 22.0.0-next.0, < 22.0.0-next.12
- >= 21.0.0-next.0, < 21.2.13
- >= 20.0.0-next.0, < 20.3.21
- >= 19.0.0-next.0, < 19.2.22
- <= 18.2.14
Fixed in 22.0.0-next.12, 21.2.13, 20.3.21, 19.2.22
Mitigation
Upgrade angular to 22.0.0-next.12 or 21.2.13 or 20.3.21 or 19.2.22 or later.
References
- Vendor advisory github.com/angular/angular/security/advisories…
- Patch github.com/angular/angular/pull/68570
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.