Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 11, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@angular/platform-server (source) 20.1.6 -> 20.3.0 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2025-59052

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 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:

# 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.

Patches

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

Workarounds

  • Disable SSR via Server Routes (v19+) or builder options.
  • Remove any asynchronous behavior from custom bootstrap functions.
  • Remove uses of getPlatform() in application code.
  • Ensure that the server build defines ngJitMode as false.

References


Release Notes

angular/angular (@​angular/platform-server)

v20.3.0

Compare Source

Breaking Changes

core
  • The server-side bootstrapping process has been changed to eliminate the reliance on a global platform injector.

    Before:

    const bootstrap = () => bootstrapApplication(AppComponent, config);

    After:

    const bootstrap = (context: BootstrapContext) =>
      bootstrapApplication(AppComponent, config, context);

    A schematic is provided to automatically update main.server.ts files to pass the BootstrapContext to the bootstrapApplication call.

    In addition, getPlatform() and destroyPlatform() will now return null and be a no-op respectively when running in a server environment.

    (cherry picked from commit 8bf80c9)

Commit Type Description
a3f808d7c8 fix remove refresh button from transfer state tab (#​63592)
core
Commit Type Description
6117ccee2e feat introduce BootstrapContext for improved server bootstrapping (#​63636)

v20.2.4

Compare Source

core
Commit Type Description
dc64f3e478 fix Fixed inject migration schematics for migrate destructured properties (#​62832)
platform-server
Commit Type Description
d1d32db972 fix prevent false warning for duplicate state serialization (#​63525)

v20.2.3

Compare Source

compiler
Commit Type Description
479a919f42 fix fixes regression with event parsing and animate prefix (#​63470)
core
Commit Type Description
f87fad3fff fix avoid injecting internal error handler from a destroyed injector (#​62275)
114906d2d6 fix Fix cancellation of animation enter classes (#​63442)
596b545130 fix Prevent an error on cleanup when an rxResource stream threw before returning an Observable (#​63342)

v20.2.2

Compare Source

compiler
Commit Type Description
d7b6045d61 fix fixes animations on elements with structural directives (#​63390)
core
Commit Type Description
6c421ed65d fix Ensures @for loop animations never get cancelled (#​63328)
9093e0e132 fix fix memory leak with leaving nodes tracking (#​63328)
c8f07daf8f fix Fixes animate.leave binding to a string with spaces (#​63366)

v20.2.1

Compare Source

compiler
Commit Type Description
a28672fb70 fix Keep paraenthesis in Nullish + Boolean expression. (#​63292)

v20.2.0

Compare Source

Deprecations

animations
core
router
  • The Router.getCurrentNavigation method is deprecated. Use the Router.currentNavigation signal instead.
  • The Router.getCurrentNavigation method is deprecated. Use the Router.currentNavigation signal instead.
animations
Commit Type Description
9766116cea refactor deprecate the animations package (#​62795)
compiler
Commit Type Description
7767aa640c fix allow more characters in square-bracketed attribute names (#​62742)
7b51728813 fix fixes animation event host bindings not firing (#​63217)
compiler-cli
Commit Type Description
5abfe4a899 feat add diagnostic for uninvoked functions in text interpolation (#​59191)
c4917074f1 fix display proper function in NG8117 message (#​62842)
812463c563 fix Ignore diagnostics on ngTemplateContextGuard lines in TCB (#​63054)
45b030b5ce fix prevent dom event assertion in TCB generation on older angular versions (#​63053)
core
Commit Type Description
6b1f4b9e8b feat add enter and leave animation instructions (#​62682)
cec91c0035 feat add option to infer the tag names of components in tests (#​62283)
141bb75ff2 feat Promote zoneless to stable (#​62699)
4138aca91f feat render ARIA property bindings as attributes (#​62630)
a409534d6c feat support as aliases on else if blocks (#​63047)
745ea44394 feat support TypeScript 5.9 (#​62541)
593cc8a368 fix checks if body exists before continuing (#​62768)
bdc31675b7 fix ensure animate events do not have duplicate elements (#​63216)
de3a0c5cf3 fix Fix animate.enter class removal when composing classes (#​62981)
6597ac0af7 fix fix support for space separated strings in leave animations (#​62979)
ebd622b344 fix fixes empty animations when recalculating styles (#​63007)
455b147488 fix fixes timing issues with enter animations (#​62925)
f9d73cc687 fix handle cases where classes added have no animations (#​63242)
6a1184600c fix prevents duplicate nodes when @if toggles with leave animations (#​63048)
063b5e166f fix switch check to documentElement with chaining (#​62773)
320de4e96d refactor deprecate animations field on component interface (#​62895)
forms
Commit Type Description
c353497a01 feat add support for pushing an array of controls to formarray (#​57102)
http
Commit Type Description
0984b30388 feat Add redirected property to HttpResponse and HttpErrorResponse (#​62675)
be811fee79 feat add referrer & integrity support for fetch requests in httpResource (#​62461)
1cf9d9064c feat Add support for fetch referrer & integrity options in HttpClient (#​62417)
1408baff45 fix Add missing timeout and transferCache options to HttpClient (#​62586)
language-service
Commit Type Description
c81e345e72 feat support auto-import for attribute completions (#​62797)
d64dd27a02 feat support to report the deprecated API in the template (#​62054)
591c7e2ec8 fix Support to resolve the re-export component. (#​62585)
platform-browser
Commit Type Description
52b8e07d6e feat Warns on conflicting hydration and blocking navigation (#​62963)
router
Commit Type Description
d00b3fed58 feat add a currentNavigation signal to the Router service. (#​62971)
687c374826 feat add a currentNavigation signal to the Router service. (#​63011)
9c45c322d1 fix ensure preloaded components are properly activated (#​62502)
service-worker
Commit Type Description
8255e0cf15 feat add messageerror event handling and logging (#​62834)
5220b51e75 feat Adds for type in provideServiceWorker (#​62831)
4ac6171b09 feat Adds support for updateViaCache in provideServiceWorker (#​62721)
b65c3d5e19 feat Improves storage full detection in data caching (#​62737)
3b214d2040 feat Logs unhandled promise rejections in service worker (#​63059)
6d011687ec feat notify clients about version failures (#​62718)

v20.1.8

Compare Source

compiler
Commit Type Description
691f5ed033 fix error when ng-content fallback has translated children (#​63156)
b1dec9bc50 fix incorrect source span for expression AST inside template attribute (#​63175)
compiler-cli
Commit Type Description
cda402f1d8 fix account for expression with type arguments during HMR extraction (#​63261)

v20.1.7

Compare Source

compiler
Commit Type Description
d9e37908a5 fix incorrect spans for AST inside input value with leading space (#​63082)
compiler-cli
Commit Type Description
4aa120ac00 fix error when type checking host bindings of generic directive (#​63061)
core
Commit Type Description
322042c5b3 fix destroying the effect on afterRenderEffect (#​63001)
router
Commit Type Description
5fd79424e3 fix attempt to resolve component resources in JIT mode (#​63062)

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Sep 11, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm warn Unknown env config "store". This will stop working in the next major version of npm.
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: @angular/[email protected]
npm error node_modules/@angular/common
npm error   @angular/common@"20.1.6" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @angular/common@"20.3.0" from @angular/[email protected]
npm error node_modules/@angular/platform-server
npm error   @angular/platform-server@"20.3.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2025-09-25T20_45_24_029Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2025-09-25T20_45_24_029Z-debug-0.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants