chore(deps): update dependency @angular/ssr to v20.3.6 [security] #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
20.0.0
->20.3.6
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 explicitBootstrapContext
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 returnsnull
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:As is usually the case for changes to Angular, an automatic schematic will take care of these code changes as part of ng update:
The schematic can also be invoked explicitly if the version bump was pulled in independently:
For applications that still use
CommonEngine
, thebootstrap
property inCommonEngineOptions
also gains the samecontext
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 usegetPlatform
or custom async logic inbootstrap
. 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.21Workarounds
bootstrap
functions.getPlatform()
in application code.ngJitMode
as false.References
CVE-2025-62427
Impact
The vulnerability is a Server-Side Request Forgery (SSRF) flaw within the URL resolution mechanism of Angular's Server-Side Rendering package (
@angular/ssr
).The function
createRequestUrl
uses the nativeURL
constructor. When an incoming request path (e.g.,originalUrl
orurl
) begins with a double forward slash (//
) or backslash (\\
), theURL
constructor treats it as a schema-relative URL. This behavior overrides the security-intended base URL (protocol, host, and port) supplied as the second argument, instead resolving the URL against the scheme of the base URL but adopting the attacker-controlled hostname.This allows an attacker to specify an external domain in the URL path, tricking the Angular SSR environment into setting the page's virtual location (accessible via
DOCUMENT
orPlatformLocation
tokens) to this attacker-controlled domain. Any subsequent relative HTTP requests made during the SSR process (e.g., usingHttpClient.get('assets/data.json')
) will be incorrectly resolved against the attacker's domain, forcing the server to communicate with an arbitrary external endpoint.Exploit Scenario
A request to
http://localhost:4200//attacker-domain.com/some-page
causes Angular to believe the host is attacker-domain.com. A relative request to api/data then becomes a server-side request tohttp://attacker-domain.com/api/data
.Patches
@angular/ssr
19.2.18@angular/ssr
20.3.6@angular/ssr
21.0.0-next.8Mitigation
The application's internal location must be robustly determined from the incoming request. The fix requires sanitizing or validating the request path to prevent it from being interpreted as a schema-relative URL (i.e., ensuring it does not start with
//
).Server-Side Middleware
If you can't upgrade to a patched version, implement a middleware on the Node.js/Express server that hosts the Angular SSR application to explicitly reject or sanitize requests where the path begins with a double slash (
//
).Example (Express/Node.js):
References
Release Notes
angular/angular-cli (@angular/ssr)
v20.3.6
Compare Source
@angular/ssr
v20.3.5
Compare Source
@angular/build
v20.3.4
Compare Source
@schematics/angular
process.env['pm_id']
@angular-devkit/build-angular
InjectionToken
as pure for improved tree-shaking@angular/build
InjectionToken
as pure for improved tree-shakingv20.3.3
Compare Source
@schematics/angular
__screenshots__/
to.gitignore
@angular/ssr
v20.3.2
Compare Source
v20.3.1
Compare Source
@angular/build
7.1.5
v20.3.0
Compare Source
Breaking Changes
@angular/ssr
The server-side bootstrapping process has been changed to eliminate the reliance on a global platform injector.
Before:
After:
@schematics/angular
@angular/cli
@angular-devkit/build-angular
@angular/build
@angular/ssr
v20.2.2
Compare Source
@angular/cli
@angular/build
v20.2.1
Compare Source
@angular/cli
@schematics/angular
@angular-devkit/schematics-cli
@angular/build
v20.2.0
Compare Source
@angular/cli
@schematics/angular
@angular-devkit/schematics
@angular/build
v20.1.6
Compare Source
@schematics/angular
typeSeparator
in the library schematicv20.1.5
Compare Source
@angular/cli
v20.1.4
Compare Source
@angular/cli
@angular/build
v20.1.3
Compare Source
@angular/build
vite
to7.0.6
v20.1.2
Compare Source
@angular/cli
define
option is being included multiple times in the JSON help@angular-devkit/core
v20.1.1
Compare Source
@angular/build
outputHashing
is set toall
orbundles
when HMR is enabledv20.1.0
Compare Source
@angular/cli
@schematics/angular
@angular-devkit/build-angular
@angular/build
@angular/ssr
loadChildren
runs in correct injection context during route extractionv20.0.6
Compare Source
@schematics/angular
@angular/build
@vitest/browser/context
from esbuild bundlingv20.0.5
Compare Source
@angular-devkit/build-angular
@vitejs/plugin-basic-ssl
dependency@angular/build
/
to/base
v20.0.4
Compare Source
@schematics/angular
@angular/ssr
v20.0.3
Compare Source
@schematics/angular
main.server.ts
intsconfig.files
when presenttypeSeparator
when generating applications@angular/build
v20.0.2
Compare Source
@schematics/angular
less
as a devDependency when selected as the style preprocessor@angular/build
v20.0.1
Compare Source
@angular/cli
@schematics/angular
@angular/build
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ 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.
This PR was generated by Mend Renovate. View the repository job log.