chore(deps): update dependency astro to v5.14.3 [security] #314
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:
5.13.3
->5.14.3
GitHub Vulnerability Alerts
CVE-2025-61925
Summary
When running Astro in on-demand rendering mode using a adapter such as the node adapter it is possible to maliciously send an
X-Forwarded-Host
header that is reflected when using the recommendedAstro.url
property as there is no validation that the value is safe.Details
Astro reflects the value in
X-Forwarded-Host
in output when usingAstro.url
without any validation.It is common for web servers such as nginx to route requests via the
Host
header, and forward on other request headers. As such as malicious request can be sent with both aHost
header and anX-Forwarded-Host
header where the values do not match and theX-Forwarded-Host
header is malicious. Astro will then return the malicious value.This could result in any usages of the
Astro.url
value in code being manipulated by a request. For example if a user follows guidance and usesAstro.url
for a canonical link the canonical link can be manipulated to another site. It is not impossible to imagine that the value could also be used as a login/registration or other form URL as well, resulting in potential redirecting of login credentials to a malicious party.As this is a per-request attack vector the surface area would only be to the malicious user until one considers that having a caching proxy is a common setup, in which case any page which is cached could persist the malicious value for subsequent users.
Many other frameworks have an allowlist of domains to validate against, or do not have a case where the headers are reflected to avoid such issues.
PoC
nvm use
yarn run build
node ./dist/server/entry.mjs
curl --location 'http://localhost:4321/' --header 'X-Forwarded-Host: www.evil.com' --header 'Host: www.example.com'
X-Forwarded-Host
headerFor the more advanced / dangerous attack vector deploy the application behind a caching proxy, e.g. Cloudflare, set a non-zero cache time, perform the above
curl
request a few times to establish a cache, then perform the request without the malicious headers and observe that the malicious data is persisted.Impact
This could affect anyone using Astro in an on-demand/dynamic rendering mode behind a caching proxy.
Release Notes
withastro/astro (astro)
v5.14.3
Compare Source
Patch Changes
#14505
28b2a1d
Thanks @matthewp! - FixesCannot set property manifest
error in test utilities by adding a protected setter for the manifest property#14235
c4d84bb
Thanks @toxeeec! - Fixes a bug where the "tap" prefetch strategy worked only on the first clicked link with view transitions enabledv5.14.1
Compare Source
Patch Changes
a3e16ab
Thanks @florian-lefebvre! - Fixes a case where the URLs generated by the experimental Fonts API would be incorrect in devv5.14.0
Compare Source
Minor Changes
#13520
a31edb8
Thanks @openscript! - Adds a new propertyroutePattern
available toGetStaticPathsOptions
This provides the original, dynamic segment definition in a routing file path (e.g.
/[...locale]/[files]/[slug]
) from the Astro render context that would not otherwise be available within the scope ofgetStaticPaths()
. This can be useful to calculate theparams
andprops
for each page route.For example, you can now localize your route segments and return an array of static paths by passing
routePattern
to a customgetLocalizedData()
helper function. Theparams
object will be set with explicit values for each route segment (e.g.locale
,files
, andslug)
. Then, these values will be used to generate the routes and can be used in your page template viaAstro.params
.v5.13.11
Compare Source
Patch Changes
#14409
250a595
Thanks @louisescher! - Fixes an issue whereastro info
would log errors to console in certain cases.#14398
a7df80d
Thanks @idawnlight! - Fixes an unsatisfiable type definition when callingaddServerRenderer
on an experimental container instance#13747
120866f
Thanks @jp-knj! - Adds automatic request signal abortion when the underlying socket closes in the Node.js adapterThe Node.js adapter now automatically aborts the
request.signal
when the client connection is terminated. This enables better resource management and allows applications to properly handle client disconnections through the standardAbortSignal
API.#14428
32a8acb
Thanks @drfuzzyness! - Force sharpService to return a Uint8Array if Sharp returns a SharedArrayBuffer#14411
a601186
Thanks @GameRoMan! - Fixes relative links to docs that could not be opened in the editor.v5.13.10
Compare Source
Patch Changes
1e2499e
]:v5.13.9
Compare Source
Patch Changes
54dcd04
Thanks @FredKSchott! - Removes warning that caused unexpected console spam when using Bunv5.13.8
Compare Source
Patch Changes
#14300
bd4a70b
Thanks @louisescher! - Adds Vite version & integration versions to output ofastro info
#14341
f75fd99
Thanks @delucis! - Fixes support for declarative Shadow DOM when using the<ClientRouter>
component#14350
f59581f
Thanks @ascorbic! - Improves error reporting for content collections by adding logging for configuration errors that had previously been silently ignored. Also adds a new error that is thrown if a live collection is used incontent.config.ts
rather thanlive.config.ts
.#14343
13f7d36
Thanks @florian-lefebvre! - Fixes a regression in non node runtimesv5.13.7
Compare Source
Patch Changes
#14330
72e14ab
Thanks @ascorbic! - Removes pinned package that is no longer needed.#14335
17c7b03
Thanks @florian-lefebvre! - Bumpssharp
minimal version to0.34.0
v5.13.6
Compare Source
Patch Changes
#14294
e005855
Thanks @martrapp! - Restores the ability to use Google AnalyticsHistory change trigger
with the<ClientRouter />
.#14326
c24a8f4
Thanks @jsparkdev! - Updatesvite
version to fix CVE#14108
218e070
Thanks @JusticeMatthew! - Updates dynamic route split regex to avoid infinite retries/exponential complexity#14327
c1033be
Thanks @ascorbic! - Pins simple-swizzle to avoid compromised versionv5.13.5
Compare Source
Patch Changes
#14286
09c5db3
Thanks @ematipico! - BREAKING CHANGES only to the experimental CSP featureThe following runtime APIs of the
Astro
global have been renamed:Astro.insertDirective
toAstro.csp.insertDirective
Astro.insertStyleResource
toAstro.csp.insertStyleResource
Astro.insertStyleHash
toAstro.csp.insertStyleHash
Astro.insertScriptResource
toAstro.csp.insertScriptResource
Astro.insertScriptHash
toAstro.csp.insertScriptHash
The following runtime APIs of the
APIContext
have been renamed:ctx.insertDirective
toctx.csp.insertDirective
ctx.insertStyleResource
toctx.csp.insertStyleResource
ctx.insertStyleHash
toctx.csp.insertStyleHash
ctx.insertScriptResource
toctx.csp.insertScriptResource
ctx.insertScriptHash
toctx.csp.insertScriptHash
#14283
3224637
Thanks @ematipico! - Fixes an issue where CSP headers were incorrectly injected in the development server.#14275
3e2f20d
Thanks @florian-lefebvre! - Adds support for experimental CSP when using experimental fontsExperimental fonts now integrate well with experimental CSP by injecting hashes for the styles it generates, as well as
font-src
directives.No action is required to benefit from it.
#14280
4b9fb73
Thanks @ascorbic! - Fixes a bug that caused cookies to not be correctly set when using middleware sequences#14276
77281c4
Thanks @ArmandPhilippot! - Adds a missing export forresolveSrc
, a documented image services utility.v5.13.4
Compare Source
Patch Changes
#14260
86a1e40
Thanks @jp-knj! - FixesAstro.url.pathname
to respecttrailingSlash: 'never'
configuration when using a base path. Previously, the root path with a base would incorrectly return/base/
instead of/base
whentrailingSlash
was set to 'never'.#14248
e81c4bd
Thanks @julesyoungberg! - Fixes a bug where actions named 'apply' do not work due to being a function prototype method.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.
This PR was generated by Mend Renovate. View the repository job log.