# CVE-2025-55207: @astrojs/node's trailing slash handling causes open redirect issue

> Attackers can redirect users to malicious sites via crafted links in specific Astro Node adapter configurations, enabling phishing attacks.

- **Severity:** Medium 5.5 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Aug 2025
- **Updated:** 15 Aug 2025
- **Also known as:** GHSA-9x9c-ghc5-jhw9

## What is CVE-2025-55207?

CVE-2025-55207 is a medium-severity vulnerability in withastro astro, published on 15 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Astro is a web framework for content-driven websites. Following CVE-2025-54793 there's still an Open Redirect vulnerability in a subset of Astro deployment scenarios prior to version 9.4.1. Astro 5.12.8 addressed CVE-2025-54793 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. This 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. This issue has been patched in version 9.4.1.

Weakness: CWE-601 (URL Redirection to Untrusted Site)

## Which versions are affected by CVE-2025-55207?

2 open source packages ship an affected version, including @astrojs/node.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@astrojs/node` | npm | All versions | 9.4.1 |
| `@astrojs/node` | npm | All versions | 9.4.1 |

## How do I fix CVE-2025-55207?

Upgrade @astrojs/node to 9.4.1 or later.

## Is CVE-2025-55207 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-55207 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-55207 and fix it if it is affected.

What it is: CVE-2025-55207 is a medium-severity vulnerability in withastro astro, published on 15 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-55207 exists.

Affected packages and fixed versions:
- @astrojs/node (npm): affected all versions; fixed in 9.4.1
- @astrojs/node (npm): affected all versions; fixed in 9.4.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-55207/ (Markdown: https://insights.sbomify.com/CVE-2025-55207/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-55207
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-55207
- OSV: https://osv.dev/vulnerability/CVE-2025-55207

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-55207/
Summaries are generated and may contain mistakes; the official description above is the record.
