Summary
Workarounds
- Disable SSR via Server Routes (v19+) or builder options.
- Remove any asynchronous behavior from custom
bootstrapfunctions. - Remove uses of
getPlatform()in application code. - Ensure that the server build defines
ngJitModeas false.
References
Impact
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 following APIs were vulnerable and required SSR-only breaking changes:
bootstrapApplication: This function previously implicitly retrieved the last platform injector that was created. It now requires an explicitBootstrapContextin a server environment. This function is only used for standalone applications. NgModule-based applications are not affected.getPlatform: This function previously returned the last platform instance that was created. It now always returnsnullin a server environment.destroyPlatform: This function previously destroyed the last platform instance that was created. It's now a no-op when called in a server environment.
For bootstrapApplication, the framework now provides a new argument to the application's bootstrap function:
// Before:
const bootstrap = () => bootstrapApplication(AppComponent, config);
// After:
const bootstrap = (context: BootstrapContext) =>
bootstrapApplication(AppComponent, config, context);
As is usually the case for changes to Angular, an automatic schematic will take care of these code changes as part of ng update:
# For apps on Angular v20:
ng update @angular/cli @angular/core
# For apps on Angular v19:
ng update @angular/cli@19 @angular/core@19
# For apps on Angular v18:
ng update @angular/cli@18 @angular/core@18
The schematic can also be invoked explicitly if the version bump was pulled in independently:
# For apps on Angular v20:
ng update @angular/core --name add-bootstrap-context-to-server-main
# For apps on Angular v19:
ng update @angular/core@19 --name add-bootstrap-context-to-server-main
# For apps on Angular v18:
ng update @angular/core@18 --name add-bootstrap-context-to-server-main
For applications that still use CommonEngine, the bootstrap property in CommonEngineOptions also gains the same context argument in the patched versions of Angular.
In local development (ng serve), Angular CLI triggered a codepath for Angular's "JIT" feature on the server even in applications that weren't using it in the browser. The codepath introduced async behavior between platform creation and application bootstrap, triggering the race condition even if an application didn't explicitly use getPlatform or custom async logic in bootstrap. Angular applications should never run in this mode outside of local development.
Multiple concurrent operations access a shared resource without proper synchronization, producing unpredictable results depending on timing. Typical impact: TOCTOU exploits, data corruption, or privilege escalation.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
The issue has been patched in all active release lines as well as in the v21 prerelease:
@angular/platform-server: 21.0.0-next.3@angular/platform-server: 20.3.0@angular/platform-server: 19.2.15@angular/platform-server:18.2.14@angular/ssr: 21.0.0-next.3@angular/ssr: 20.3.0@angular/ssr: 19.2.16@angular/ssr: 18.2.21
Frequently Asked Questions
- What is CVE-2025-59052? CVE-2025-59052 is a high-severity race condition vulnerability in @angular/platform-server (npm), affecting versions >= 16.0.0-next.0, < 18.2.14. It is fixed in 18.2.14, 20.3.0, 19.2.15, 21.0.0-next.3, 18.2.21, 19.2.16. Multiple concurrent operations access a shared resource without proper synchronization, producing unpredictable results depending on timing.
- Which packages are affected by CVE-2025-59052?
@angular/platform-server(npm) (versions >= 16.0.0-next.0, < 18.2.14)@angular/ssr(npm) (versions >= 17.0.0-next.0, < 18.2.21)@nguniversal/common(npm) (versions >= 16.0.0-next.0, <= 16.2.0)
- Is there a fix for CVE-2025-59052? Yes. CVE-2025-59052 is fixed in 18.2.14, 20.3.0, 19.2.15, 21.0.0-next.3, 18.2.21, 19.2.16. Upgrade to this version or later.
- Is CVE-2025-59052 exploitable, and should I be worried? Whether CVE-2025-59052 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-59052 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-59052?
- Upgrade
@angular/platform-serverto 18.2.14 or later - Upgrade
@angular/platform-serverto 20.3.0 or later - Upgrade
@angular/platform-serverto 19.2.15 or later - Upgrade
@angular/platform-serverto 21.0.0-next.3 or later - Upgrade
@angular/ssrto 18.2.21 or later - Upgrade
@angular/ssrto 19.2.16 or later - Upgrade
@angular/ssrto 20.3.0 or later - Upgrade
@angular/ssrto 21.0.0-next.3 or later
- Upgrade