chore(deps): update dependency @astrojs/node to v9.5.4 [security]#380
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency @astrojs/node to v9.5.4 [security]#380renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
fd328b5 to
327215d
Compare
327215d to
2bd912a
Compare
2bd912a to
0ea5988
Compare
0ea5988 to
bc59db8
Compare
bc59db8 to
a8c3517
Compare
a8c3517 to
0069060
Compare
0069060 to
9f3c988
Compare
9f3c988 to
e892ec7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
9.0.2→9.5.4GitHub Vulnerability Alerts
CVE-2025-55207
Summary
Following GHSA-cq8c-xv66-36gw, there's still an Open Redirect vulnerability in a subset of Astro deployment scenarios.
Details
Astro 5.12.8 fixed a case where
https://example.com//astro.build/presswould redirect to the external origin//astro.build/press. However, with the Node deployment adapter in standalone mode andtrailingSlashset to"always"in the Astro configuration,https://example.com//astro.build/pressstill redirects to//astro.build/press.Proof of Concept
astro@5.12.8)@astrojs/node@9.4.0) and force trailing slashes:astro build.astro preview.//astro.build/pressto the preview URL, e.g. http://localhost:4321//astro.build/pressExample reproduction
//astro.build/pressto the preview URL, e.g.https://x.local-corp.webcontainer.io//astro.build/press.Impact
This is classified as an Open Redirection vulnerability (CWE-601). It affects any user who clicks on a specially crafted link pointing to the affected domain. Since the domain appears legitimate, victims may be tricked into trusting the redirected page, leading to possible credential theft, malware distribution, or other phishing-related attacks.
No authentication is required to exploit this vulnerability. Any unauthenticated user can trigger the redirect by clicking a malicious link.
CVE-2025-55303
Summary
In affected versions of
astro, the image optimization endpoint in projects deployed with on-demand rendering allows images from unauthorized third-party domains to be served.Details
On-demand rendered sites built with Astro include an
/_imageendpoint which returns optimized versions of images.The
/_imageendpoint is restricted to processing local images bundled with the site and also supports remote images from domains the site developer has manually authorized (using theimage.domainsorimage.remotePatternsoptions).However, a bug in impacted versions of
astroallows an attacker to bypass the third-party domain restrictions by using a protocol-relative URL as the image source, e.g./_image?href=//example.com/image.png.Proof of Concept
Create a new minimal Astro project (
astro@5.13.0).Configure it to use the Node adapter (
@astrojs/node@9.1.0— newer versions are not impacted):Build the site by running
astro build.Run the server, e.g. with
astro preview.Append
/_image?href=//placehold.co/600x400to the preview URL, e.g. http://localhost:4321/_image?href=//placehold.co/600x400The site will serve the image from the unauthorized
placehold.coorigin.Impact
Allows a non-authorized third-party to create URLs on an impacted site’s origin that serve unauthorized image content.
In the case of SVG images, this could include the risk of cross-site scripting (XSS) if a user followed a link to a maliciously crafted SVG.
CVE-2026-25545
Summary
Server-Side Rendered pages that return an error with a prerendered custom error page (eg.
404.astroor500.astro) are vulnerable to SSRF. If theHost:header is changed to an attacker's server, it will be fetched on/500.htmland they can redirect this to any internal URL to read the response body through the first request.Details
The following line of code fetches
statusURLand returns the response back to the client:https://github.com/withastro/astro/blob/bf0b4bfc7439ddc565f61a62037880e4e701eb05/packages/astro/src/core/app/base.ts#L534
statusURLcomes fromthis.baseWithoutTrailingSlash, which is built from theHost:header.prerenderedErrorPageFetch()is justfetch(), and follows redirects. This makes it possible for an attacker to set theHost:header to their server (eg.Host: attacker.tld), and if the server still receives the request without normalization, Astro will now fetchhttp://attacker.tld/500.html.The attacker can then redirect this request to http://localhost:8000/ssrf.txt, for example, to fetch any locally listening service. The response code is not checked, because as the comment in the code explains, this fetch may give a 200 OK. The body and headers are returned back to the attacker.
Looking at the vulnerable code, the way to reach this is if the
renderError()function is called (error response during SSR) and the error page is prerendered (custom500.astroerror page). The PoC below shows how a basic project with these requirements can be set up.Note: Another common vulnerable pattern for
404.astrowe saw is:Also, it does not matter what
allowedDomainsis set to, since it only checks theX-Forwarded-Host:header.https://github.com/withastro/astro/blob/9e16d63cdd2537c406e50d005b389ac115755e8e/packages/astro/src/core/app/base.ts#L146
PoC
poc/src/pages/error.astrowhich throws an error with SSR:poc/src/pages/500.astrowith any content like:ssrf.txtand host it locally on http://localhost:8000:$ curl -i http://localhost:4321/error -H 'Host: localhost:5000' HTTP/1.1 500 OK content-type: text/plain date: Tue, 03 Feb 2026 09:51:28 GMT last-modified: Tue, 03 Feb 2026 09:51:09 GMT server: SimpleHTTP/0.6 Python/3.12.3 Connection: keep-alive Keep-Alive: timeout=5 Transfer-Encoding: chunked SECRET CONTENTImpact
An attacker who can access the application without
Host:header validation (eg. through finding the origin IP behind a proxy, or just by default) can fetch their own server to redirect to any internal IP. With this they can fetch cloud metadata IPs and interact with services in the internal network or localhost.For this to be vulnerable, a common feature needs to be used, with direct access to the server (no proxies).
CVE-2026-27829
Summary
A bug in Astro's image pipeline allows bypassing
image.domains/image.remotePatternsrestrictions, enabling the server to fetch content from unauthorized remote hosts.Details
Astro provides an
inferSizeoption that fetches remote images at render time to determine their dimensions. Remote image fetches are intended to be restricted to domains the site developer has manually authorized (using theimage.domainsorimage.remotePatternsoptions).However, when
inferSizeis used, no domain validation is performed — the image is fetched from any host regardless of the configured restrictions. An attacker who can influence the image URL (e.g., via CMS content or user-supplied data) can cause the server to fetch from arbitrary hosts.PoC
Details
Setup
Create a new Astro project with the following files:
package.json:{ "name": "poc-ssrf-infersize", "private": true, "scripts": { "dev": "astro dev --port 4322", "build": "astro build" }, "dependencies": { "astro": "5.17.2", "@​astrojs/node": "9.5.3" } }astro.config.mjs— onlylocalhost:9000is authorized:internal-service.mjs— simulates an internal service on a non-allowlisted host (127.0.0.1:8888):src/pages/test.astro:Steps to reproduce
npm installand start the internal service:internal-service.mjslogsReceived: GET /internal-api— the request was sent to127.0.0.1:8888despite onlylocalhost:9000being in the allowlist.Impact
Allows bypassing
image.domains/image.remotePatternsrestrictions to make server-side requests to unauthorized hosts. This includes the risk of server-side request forgery (SSRF) against internal network services and cloud metadata endpoints.CVE-2026-27729
Summary
Astro server actions have no default request body size limit, which can lead to memory exhaustion DoS. A single large POST to a valid action endpoint can crash the server process on memory-constrained deployments.
Details
On-demand rendered sites built with Astro can define server actions, which automatically parse incoming request bodies (JSON or FormData). The body is buffered entirely into memory with no size limit — a single oversized request is sufficient to exhaust the process heap and crash the server.
Astro's Node adapter (
mode: 'standalone') creates an HTTP server with no body size protection. In containerized environments, the crashed process is automatically restarted, and repeated requests cause a persistent crash-restart loop.Action names are discoverable from HTML form attributes on any public page, so no authentication is required.
PoC
Details
Setup
Create a new Astro project with the following files:
package.json:{ "name": "poc-dos", "private": true, "scripts": { "build": "astro build", "start:128mb": "node --max-old-space-size=128 dist/server/entry.mjs" }, "dependencies": { "astro": "5.17.2", "@​astrojs/node": "9.5.3" } }astro.config.mjs:src/actions/index.ts:src/pages/index.astro:crash-test.mjs:Reproduction
The server process crashes with
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory. The payload is buffered entirely into memory before any validation, exceeding the 128 MB heap limit.Impact
Allows unauthenticated denial of service against SSR standalone deployments using server actions. A single oversized request crashes the server process, and repeated requests cause a persistent crash-restart loop in containerized environments.
Release Notes
withastro/astro (@astrojs/node)
v9.5.4Compare Source
Patch Changes
#15564
522f880Thanks @matthewp! - Add a default body size limit for server actions to prevent oversized requests from exhausting memory.#15572
ef851bfThanks @matthewp! - Upgrade astro package supportastro@5.17.3 includes a fix to prevent Action payloads from exhausting memory. @astrojs/node now depends on this version of Astro as a minimum requirement.
v9.5.3Compare Source
Patch Changes
c13b536Thanks @matthewp! - Improves error page loading to read from disk first before falling back to configured hostv9.5.2Compare Source
Patch Changes
#15196
a8317c1Thanks @ematipico! - Fixes an issue where some prendered pages weren't correctly rendered when using the Node.js adapter in middleware mode.#15169
b803d8bThanks @rururux! - fix: fix image 500 error when moving dist directory in standalone Nodev9.5.1Compare Source
Patch Changes
9e9c528,0f75f6b]:v9.5.0Compare Source
Minor Changes
#14441
62ec8eaThanks @upsuper! - Updates redirect handling to be consistent acrossstaticandserveroutput, aligning with the behavior of other adapters.Previously, the Node.js adapter used default HTML files with meta refresh tags when in
staticoutput. This often resulted in an extra flash of the page on redirect, while also not applying the proper status code for redirections. It's also likely less friendly to search engines.This update ensures that configured redirects are always handled as HTTP redirects regardless of output mode, and the default HTML files for the redirects are no longer generated in
staticoutput. It makes the Node.js adapter more consistent with the other official adapters.No change to your project is required to take advantage of this new adapter functionality. It is not expected to cause any breaking changes. However, if you relied on the previous redirecting behavior, you may need to handle your redirects differently now. Otherwise you should notice smoother redirects, with more accurate HTTP status codes, and may potentially see some SEO gains.
v9.4.6Compare Source
Patch Changes
66a26d7Thanks @matthewp! - Fixes compatibility issue with older versions of Astro by makinggetAllowedDomains()call optional and updating peer dependency to requireastro@^5.14.3v9.4.5Compare Source
Patch Changes
b8ca69b]:v9.4.4Compare Source
Patch Changes
1e2499e]:v9.4.3Compare Source
Patch Changes
77b18fbThanks @delucis! - Increases the minimum supported version of Astro to 5.7.0v9.4.2Compare Source
Patch Changes
4d16de7]:v9.4.1Compare Source
Patch Changes
5fc3c59Thanks @ematipico! - Fixes a routing bug in standalone mode withtrailingSlashset to"always".v9.4.0Compare Source
Minor Changes
#14188
e3422aaThanks @ascorbic! - Adds support for specifying a host to load prerendered error pagesBy default, if a user defines a custom error page that is prerendered, Astro will load it from the same host as the one that the request is made to. This change allows users to specify a different host for loading prerendered error pages. This can be useful in scenarios such as where the server is running behind a reverse proxy or when prerendered pages are hosted on a different domain.
To use this feature, set the
experimentalErrorPageHostadapter option in your Astro configuration to the desired host URL. For example, if your server is running on localhost and served via a proxy, you can ensure the prerendered error pages are fetched via the localhost URL:For more information on enabling and using this experimental feature, see the
@astrojs/nodeadapter docs.v9.3.3Compare Source
Patch Changes
0567fb7]:v9.3.2Compare Source
Patch Changes
f4e8889]:v9.3.1Compare Source
Patch Changes
e4d74baThanks @ColoredCarrot! - fix(node): emit set-cookie header from middlewares for not-found routes (#14136)v9.3.0Compare Source
Minor Changes
#14012
a125a14Thanks @florian-lefebvre! - Adds a new experimental configuration optionexperimentalDisableStreamingto allow you to opt out of Astro's default HTML streaming for pages rendered on demand.HTML streaming helps with performance and generally provides a better visitor experience. In most cases, disabling streaming is not recommended.
However, when you need to disable HTML streaming (e.g. your host only supports non-streamed HTML caching at the CDN level), you can now opt out of the default behavior:
import { defineConfig } from 'astro/config'; import node from '@​astrojs/node'; export default defineConfig({ adapter: node({ mode: 'standalone', + experimentalDisableStreaming: true, }), });#13972
db8f8beThanks @ematipico! - Adds support for the experimental static headers Astro feature.When the feature is enabled via the option
experimentalStaticHeaders, and experimental Content Security Policy is enabled, the adapter will generateResponseheaders for static pages, which allows support for CSP directives that are not supported inside a<meta>tag (e.g.frame-ancestors).v9.2.2Compare Source
Patch Changes
660e83fThanks @TheOtterlord! - Handle errors where a module is not found when loading the server entrypointv9.2.1Compare Source
Patch Changes
5dd2d3fThanks @florian-lefebvre! - Removes unused codev9.2.0Compare Source
Minor Changes
#13527
2fd6a6bThanks @ascorbic! - The experimental session API introduced in Astro 5.1 is now stable and ready for production use.Sessions are used to store user state between requests for on-demand rendered pages. You can use them to store user data, such as authentication tokens, shopping cart contents, or any other data that needs to persist across requests:
v9.1.3Compare Source
Patch Changes
042d1de]:v9.1.2Compare Source
Patch Changes
1e11f5e]:v9.1.1Compare Source
Patch Changes
c6bf6b3Thanks @lee-arnold! - Fixes the image endpoint entrypointv9.1.0Compare Source
Minor Changes
#13145
8d4e566Thanks @ascorbic! - Automatically configures filesystem storage when experimental session enabledIf the
experimental.sessionflag is enabled when using the Node adapter, Astro will automatically configure session storage using the filesystem driver. You can still manually configure session storage if you need to use a different driver or want to customize the session storage configuration.See the experimental session docs for more information on configuring session storage.
v9.0.3Patch Changes
23094a1Thanks @ascorbic! - Fixes a bug that caused incorrect redirects for static files with numbers in the file extensionConfiguration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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.