CVE-2025-55207: @astrojs/node @astrojs/node's Trailing Slash Handling Causes Vulnerability
MODERATECVE-2025-55207 is a MODERATE @astrojs/node's trailing slash handling causes vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting @astrojs/node libraries in the npm ecosystem. The issue involves @astrojs/node's trailing slash handling causes open redirect issue. Remediation is available by upgrading affected packages to version 9.4.1.
CVE-2025-55207 at a Glance
How to Fix CVE-2025-55207
To remediate this vulnerability, upgrade all affected @astrojs/node dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @astrojs/node@9.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @astrojs/node
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-55207, inspect your project dependencies using npm:
npm ls @astrojs/node
Analyze the terminal output to locate any version of @astrojs/node in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.4.1), your application is affected.
Note: The npm ls @astrojs/node command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In @astrojs/node, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-55207 Affected @astrojs/node Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@astrojs/node
|
npm |
< 9.4.1
|
9.4.1
|
References
Frequently Asked Questions
What is CVE-2025-55207?
Which @astrojs/node versions are affected?
What version fixes CVE-2025-55207?
Is @astrojs/node affected?
What CWE is associated with CVE-2025-55207?
How can I check npm dependencies for CVE-2025-55207?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9x9c-ghc5-jhw9",
"modified" : "2025-08-15T20:55:55Z",
"published" : "2025-08-15T16:52:48Z",
"aliases" : [ "CVE-2025-55207" ],
"summary" : "@astrojs/node's trailing slash handling causes open redirect issue",
"details" : "### Summary\n\nFollowing https://github.com/withastro/astro/security/advisories/GHSA-cq8c-xv66-36gw, there's still an Open Redirect vulnerability in a subset of Astro deployment scenarios.\n\n### Details\n\nAstro 5.12.8 fixed a case where `https://example.com//astro.build/press` would redirect to the external origin `//astro.build/press`. However, with the Node deployment adapter in standalone mode and `trailingSlash` set to `\"always\"` in the Astro configuration, `https://example.com//astro.build/press` still redirects to `//astro.build/press`.\n\n### Proof of Concept\n\n1. Create a new minimal Astro project (`astro@5.12.8`)\n2. Configure it to use the Node adapter (`@astrojs/node@9.4.0`) and force trailing slashes:\n ```js\n // astro.config.mjs\n import { defineConfig } from 'astro/config';\n import node from '@astrojs/node';\n \n export default defineConfig({\n trailingSlash: 'always',\n adapter: node({ mode: 'standalone' }),\n });\n ```\n3. Build the site by running `astro build`.\n4. Run the server, e.g. with `astro preview`.\n5. Append `//astro.build/press` to the preview URL, e.g. <http://localhost:4321//astro.build/press>\n6. The site will redirect to the external Astro Build origin.\n\n#### Example reproduction\n\n1. Open [this StackBlitz reproduction](https://stackblitz.com/edit/github-4fvpfhcz-nyfj2mbf).\n2. Open the preview in a separate window so the StackBlitz embed doesn't cause security errors.\n3. Append `//astro.build/press` to the preview URL, e.g. `https://x.local-corp.webcontainer.io//astro.build/press`.\n4. See it redirect to the external Astro Build origin.\n\n### Impact\n\nThis 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.\n\nNo authentication is required to exploit this vulnerability. Any unauthenticated user can trigger the redirect by clicking a malicious link.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@astrojs/node"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "9.4.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 9.4.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/security/advisories/GHSA-9x9c-ghc5-jhw9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-55207"
}, {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/commit/5fc3c599cacb0172cc7d8e1202a5f2e8685d7ef2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/withastro/astro"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-15T16:52:48Z",
"nvd_published_at" : "2025-08-15T16:15:30Z"
}
}