# CVE-2025-59052: Angular SSR: Global Platform Injector Race Condition Leads to Cross-Request Data Leakage

> Concurrent server-side rendering requests may share global state, allowing attackers to leak sensitive data from other users' responses.

- **Severity:** High 7.1 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 10 Sep 2025
- **Updated:** 10 Sep 2025
- **Also known as:** GHSA-68x2-mx4q-78m7

## What is CVE-2025-59052?

CVE-2025-59052 is a high-severity vulnerability in angular, published on 10 Sep 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

## Which versions are affected by CVE-2025-59052?

18 open source packages ship an affected version, including @angular/platform-server, @angular/ssr and @nguniversal/common.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@angular/platform-server` | npm | From 16.0.0-next.0 | 18.2.14 |
| `@angular/platform-server` | npm | From 16.0.0-next.0 | 18.2.14 |
| `@angular/platform-server` | npm | From 19.0.0-next.0 | 19.2.15 |
| `@angular/platform-server` | npm | From 19.0.0-next.0 | 19.2.15 |
| `@angular/platform-server` | npm | From 20.0.0-next.0 | 20.3.0 |
| `@angular/platform-server` | npm | From 20.0.0-next.0 | 20.3.0 |
| `@angular/platform-server` | npm | From 21.0.0-next.0 | 21.0.0-next.3 |
| `@angular/platform-server` | npm | From 21.0.0-next.0 | 21.0.0-next.3 |
| `@angular/ssr` | npm | From 17.0.0-next.0 | 18.2.21 |
| `@angular/ssr` | npm | From 17.0.0-next.0 | 18.2.21 |
| `@angular/ssr` | npm | From 19.0.0-next.0 | 19.2.16 |
| `@angular/ssr` | npm | From 19.0.0-next.0 | 19.2.16 |
| `@angular/ssr` | npm | From 20.0.0-next.0 | 20.3.0 |
| `@angular/ssr` | npm | From 20.0.0-next.0 | 20.3.0 |
| `@angular/ssr` | npm | From 21.0.0-next.0 | 21.0.0-next.3 |
| `@angular/ssr` | npm | From 21.0.0-next.0 | 21.0.0-next.3 |
| `@nguniversal/common` | npm | From 16.0.0-next.0 to 16.2.0 | None |
| `@nguniversal/common` | npm | From 16.0.0-next.0 to 16.2.0 | None |

## How do I fix CVE-2025-59052?

Upgrade @angular/platform-server to a fixed version for your release line: 18.2.14, 19.2.15, 20.3.0 or 21.0.0-next.3.

## Is CVE-2025-59052 being exploited?

There is no known exploitation of CVE-2025-59052 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-59052 and fix it if it is affected.

What it is: CVE-2025-59052 is a high-severity vulnerability in angular, published on 10 Sep 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-59052 in the wild and no public exploit code.

Affected packages and fixed versions:
- @angular/platform-server (npm): affected from 16.0.0-next.0; fixed in 18.2.14
- @angular/platform-server (npm): affected from 16.0.0-next.0; fixed in 18.2.14
- @angular/platform-server (npm): affected from 19.0.0-next.0; fixed in 19.2.15
- @angular/platform-server (npm): affected from 19.0.0-next.0; fixed in 19.2.15
- @angular/platform-server (npm): affected from 20.0.0-next.0; fixed in 20.3.0
- @angular/platform-server (npm): affected from 20.0.0-next.0; fixed in 20.3.0
- @angular/platform-server (npm): affected from 21.0.0-next.0; fixed in 21.0.0-next.3
- @angular/platform-server (npm): affected from 21.0.0-next.0; fixed in 21.0.0-next.3
- @angular/ssr (npm): affected from 17.0.0-next.0; fixed in 18.2.21
- @angular/ssr (npm): affected from 17.0.0-next.0; fixed in 18.2.21
- @angular/ssr (npm): affected from 19.0.0-next.0; fixed in 19.2.16
- @angular/ssr (npm): affected from 19.0.0-next.0; fixed in 19.2.16

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-59052/ (Markdown: https://insights.sbomify.com/CVE-2025-59052/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-59052
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-59052
- OSV: https://osv.dev/vulnerability/CVE-2025-59052

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-59052/
Summaries are generated and may contain mistakes; the official description above is the record.
