The Angular team has issued a security advisory addressing a high-severity flaw in server-side rendering (SSR) that could allow attackers to access sensitive data from unrelated requests. Tracked as CVE-2025-59052 with a CVSS score of 7.1, the vulnerability stems from a global platform injector race condition in Angular’s dependency injection system.
Angular explains: “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 practice, this means one user’s response could contain another user’s data, tokens, or headers, exposing private information. The advisory warns: “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 flaw affects several APIs used in Angular SSR environments:
- bootstrapApplication – Previously retrieved the last created platform injector. It now requires an explicit BootstrapContext parameter.
- getPlatform – Previously returned the last platform instance; it now always returns null in SSR.
- destroyPlatform – Previously destroyed the last platform instance; it is now a no-op in SSR.
For developers, this means some SSR-only breaking changes, though Angular provides automated migration schematics via ng update.
The Angular team has patched the issue across all supported release lines and the upcoming v21 prerelease:
- @angular/platform-server: 21.0.0-next.3, 20.3.0, 19.2.15, 18.2.14
- @angular/ssr: 21.0.0-next.3, 20.3.0, 19.2.16, 18.2.21
Developers can apply fixes using the standard Angular update command:
Equivalent update commands exist for v19 and v18 applications.
For projects unable to update immediately, Angular suggests the following mitigations:
- Disable SSR via Server Routes (v19+) or builder options.
- Remove any asynchronous behavior from custom bootstrap functions.
- Eliminate usage of getPlatform() in application code.
- Ensure the server build defines ngJitMode as false.