Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @nguniversal/common
  4. ›
  5. CVE-2025-59052

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

September 10, 2025

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 explicit BootstrapContext in 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 returns null in 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:

References

  • github.com/advisories/GHSA-68x2-mx4q-78m7
  • github.com/angular/angular
  • github.com/angular/angular-cli/pull/31108
  • github.com/angular/angular/pull/63562
  • github.com/angular/angular/security/advisories/GHSA-68x2-mx4q-78m7
  • nvd.nist.gov/vuln/detail/CVE-2025-59052

Code Behaviors & Features

Detect and mitigate CVE-2025-59052 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 16.0.0-next.0 up to 16.2.0

Solution

Unfortunately, there is no solution available yet.

Weakness

  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Source file

npm/@nguniversal/common/CVE-2025-59052.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 27 Sep 2025 00:18:31 +0000.