Astro's `X-Forwarded-Host` is reflected with no validation
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| withastro | astro | before 5.14.2 | 5.14.2 | Patch available | CNA |
| — | astro (npm) | before 5.14.3 | 5.14.3 | Patch available | GHSA-5ff5-9fcw-vg88 |
- astro Vendorwithastro Affected before 5.14.2 Fixed in 5.14.2 Patch available CNA
- astro (npm) Vendor— Affected before 5.14.3 Fixed in 5.14.3 Patch available GHSA-5ff5-9fcw-vg88
Remediation
- Fix · CNA astro (withastro) Fixed in 5.14.2
- Fix · GHSA-5ff5-9fcw-vg88 astro (npm) Fixed in 5.14.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-61925
- 2026-10-03 Alias added: GHSA-5ff5-9fcw-vg88
References
More withastro Astro vulnerabilities
- TI-2024-37142 Server source code is exposed to the public if sourcemaps are enabled CVSS 4.0HIGH 7.8
- TI-2025-34958 Unauthorized third-party images in Astro’s _image endpoint CVSS 4.0MEDIUM 6.9
- TI-2025-39915 Server-side request forgery in withastro astro CVSS 3.1MEDIUM 6.5
- TI-2026-36915 Astro: Reflected XSS via unescaped slot name CVSS 3.1HIGH 7.1
- TI-2025-40102 Astro is vulnerable to Reflected XSS via the server islands feature CVSS 3.1HIGH 7.1
- TI-2025-34548 Astro: Duplicate trailing slash feature can lead to Open Redirects CVSS 4.0MEDIUM 5.5
Sources
- CVE-2025-61925 · CVE Program
- CVE-2025-61925 · NVD
- FIRST EPSS
- GHSA-5ff5-9fcw-vg88 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences