ghsa-9x9c-ghc5-jhw9
Vulnerability from github
Summary
Following 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.
Details
Astro 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
.
Proof of Concept
- Create a new minimal Astro project (
astro@5.12.8
) - Configure it to use the Node adapter (
@astrojs/node@9.4.0
) and force trailing slashes: ```js // astro.config.mjs import { defineConfig } from 'astro/config'; import node from '@astrojs/node';
export default defineConfig({
trailingSlash: 'always',
adapter: node({ mode: 'standalone' }),
});
``
3. Build the site by running
astro build.
4. Run the server, e.g. with
astro preview.
5. Append
//astro.build/press` to the preview URL, e.g. http://localhost:4321//astro.build/press
6. The site will redirect to the external Astro Build origin.
Example reproduction
- Open this StackBlitz reproduction.
- Open the preview in a separate window so the StackBlitz embed doesn't cause security errors.
- Append
//astro.build/press
to the preview URL, e.g.https://x.local-corp.webcontainer.io//astro.build/press
. - See it redirect to the external Astro Build origin.
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.
{ "affected": [ { "database_specific": { "last_known_affected_version_range": "\u003c= 9.4.0" }, "package": { "ecosystem": "npm", "name": "@astrojs/node" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "9.4.1" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-55207" ], "database_specific": { "cwe_ids": [ "CWE-601" ], "github_reviewed": true, "github_reviewed_at": "2025-08-15T16:52:48Z", "nvd_published_at": "2025-08-15T16:15:30Z", "severity": "MODERATE" }, "details": "### Summary\n\nFollowing https://github.com/withastro/astro/security/advisories/GHSA-cq8c-xv66-36gw, there\u0027s 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 \u0027astro/config\u0027;\n import node from \u0027@astrojs/node\u0027;\n \n export default defineConfig({\n trailingSlash: \u0027always\u0027,\n adapter: node({ mode: \u0027standalone\u0027 }),\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. \u003chttp://localhost:4321//astro.build/press\u003e\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\u0027t 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.", "id": "GHSA-9x9c-ghc5-jhw9", "modified": "2025-08-15T20:55:55Z", "published": "2025-08-15T16:52:48Z", "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" } ], "schema_version": "1.4.0", "severity": [ { "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", "type": "CVSS_V4" } ], "summary": "@astrojs/node\u0027s trailing slash handling causes open redirect issue" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.