CVE-2025-61925 Astro's `X-Forwarded-Host` is reflected with no validation
Attackers can manipulate Astro.url via X-Forwarded-Host to redirect users to malicious sites, potentially stealing credentials if cached.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-61925?
CVE-2025-61925 is a medium-severity vulnerability in withastro astro, published on 10 Oct 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. Prior to version 5.14.2, Astro reflects the value in `X-Forwarded-Host` in output when using `Astro.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 a `Host` header and an `X-Forwarded-Host` header where the values do not match and the `X-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 uses `Astro.url` for a canonical link the canonical link can be manipulated to another site. It is theoretically possible 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. This could affect anyone using Astro in an on-demand/dynamic rendering mode behind a caching proxy. Version 5.14.2 contains a fix for the issue.
Weakness: CWE-470
Which versions are affected by CVE-2025-61925?
2 open source packages ship an affected version, including astro. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
astro npm | All versions | 5.14.3 |
astro npm | All versions | 5.14.3 |
Products include Astro Astro.
How do I fix CVE-2025-61925?
Upgrade astro to 5.14.3 or later.
Is CVE-2025-61925 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61925 exists.
Other vulnerabilities in withastro astro
- CVE-2024-56159 Server source code is exposed to the public if sourcemaps are enabled
- CVE-2026-54299 Astro: Host header SSRF in prerendered error page fetch
- CVE-2025-59837 astro allows bypass of image proxy domain validation leading to SSRF and potential XSS
- CVE-2026-50146 Astro: Reflected XSS via unescaped slot name
- CVE-2025-64764 Astro is vulnerable to Reflected XSS via the server islands feature
Sources
Also known as GHSA-5ff5-9fcw-vg88.