Angular SSR: Global Platform Injector Race Condition Leads to Cross-Request Data Leakage
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 18.2.14, 20.3.0, 19.2.15, 21.0.0-next.3, 18.2.21, and 1 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: partial
Summary
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Angular uses a DI container (the "platform injector") to hold request-specific state during server-side rendering. For historical reasons, the container was stored as a JavaScript module-scoped global variable. When multiple requests are processed concurrently, they could inadvertently share or overwrite the global injector state. In practical terms, this can lead to one request responding with data meant for a completely different request, leaking data or tokens included on the rendered page or in response headers. As long as an attacker had network access to send any traffic that received a rendered response, they may have been able to send a large number of requests and then inspect the responses for information leaks. The APIs `bootstrapApplication`, `getPlatform`, and `destroyPlatform` were vulnerable and required SSR-only breaking changes. The issue has been patched in all active release lines as well as in the v21 prerelease. Patched packages include `@angular/platform-server` 21.0.0-next.3, 20.3.0, 19.2.15, and 18.2.14 and `@angular/ssr` 21.0.0-next.3, 20.3.0, 19.2.16, and 18.2.21. Several workarounds are available. Disable SSR via Server Routes or builder options, remove any asynchronous behavior from custom `bootstrap` functions, remove uses of `getPlatform()` in application code, and/or ensure that the server build defines `ngJitMode` as false.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- angular angular
Version range not reported
- @angular/platform-servernpm
From 16.0.0-next.0 · fixed in 18.2.14
- @angular/platform-servernpm
From 20.0.0-next.0 · fixed in 20.3.0
- @angular/platform-servernpm
From 19.0.0-next.0 · fixed in 19.2.15
- @angular/platform-servernpm
From 21.0.0-next.0 · fixed in 21.0.0-next.3
- @angular/ssrnpm
From 17.0.0-next.0 · fixed in 18.2.21
- @angular/ssrnpm
From 19.0.0-next.0 · fixed in 19.2.16
- @angular/ssrnpm
From 20.0.0-next.0 · fixed in 20.3.0
- @angular/ssrnpm
From 21.0.0-next.0 · fixed in 21.0.0-next.3
- @nguniversal/commonnpm
From 16.0.0-next.0 · through 16.2.0