Skip to main content

Astro CVE-2025-61925

MEDIUM
Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (CWE-470)
2025-10-10 security-advisories@github.com
6.5
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send request with spoofed X-Forwarded-Host header
  2. Exploit
    Astro reflects value through Astro.url without validation
  3. Execution
    Caching proxy stores poisoned canonical/form URL
  4. Impact
    Subsequent users redirected to attacker-controlled site

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V15 - Secure Coding and Architecture Reflection safety, class allowlisting
Exploitation Conditions

Exploitation requires Astro to be running in on-demand/dynamic (SSR) rendering mode via a server adapter such as the Node adapter - statically generated Astro sites are NOT affected - AND application code that consumes Astro.url (e.g. for canonical links, login/registration, or form action URLs). The reverse proxy / web server in front (such as nginx) must forward the attacker-supplied X-Forwarded-Host header to the app. For the per-request case the impact is confined to the attacker's own session; the high-impact cross-user case additionally requires a caching proxy (e.g. Cloudflare) configured with a non-zero cache TTL so the poisoned value persists to other users. Limiting factors: no auth and no user interaction are needed (PR:N/UI:N), but the dependence on SSR mode, actual use of Astro.url in code, header-forwarding configuration, and a cache for stored impact all substantially narrow the realistic attack surface.

Impact

This is a moderate, context-dependent risk rather than a top-tier emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N) correctly reflects that a remote, unauthenticated attacker can trigger the flaw with a single crafted request and no user interaction, which is why the base score lands at 6.5. However, the real-world severity signals are modest and consistent with each other: EPSS is low at 0.41% (33rd percentile), the CVE is NOT on CISA KEV, and there is no evidence of active exploitation - only a publicly available proof-of-concept exists (the minimal demo server plus curl commands in the GitHub advisory). The CWE-470 label is a poor fit for what is functionally a host-header-injection / cache-poisoning issue, so do not over-weight it. The impact is genuinely limited by exploitation conditions: it only matters when Astro runs in on-demand/SSR mode, application code actually consumes Astro.url (e.g. for canonical links or form actions), and - for the dangerous cross-user case - a caching proxy persists the poisoned value. A single-user per-request reflection is low impact; the escalation to a stored/cached open-redirect affecting other users is what justifies attention. Net: a real but config-gated priority for teams running dynamic Astro behind a cache, and a non-issue for the large share of Astro deployments that are statically generated.

Exploit ScenarioDerived

An attacker sends an HTTP request to a dynamically-rendered Astro site with a legitimate Host header and a malicious X-Forwarded-Host header (e.g. www.evil.com); Astro reflects the attacker-controlled value through Astro.url, corrupting a canonical link or form action to point at the attacker's domain. If the site sits behind a caching proxy with a non-zero TTL, the poisoned page is cached and served to subsequent legitimate visitors, enabling credential-harvesting redirects or SEO/phishing abuse. A working proof-of-concept (a minimal Astro server plus curl reproduction steps) is publicly documented in the GitHub Security Advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 08, 2026

Unvalidated reflection of the X-Forwarded-Host header in Astro (versions before 5.14.3) lets remote, unauthenticated attackers control the host value returned by the Astro.url property, which can be abused for canonical-link manipulation, redirecting credentials submitted through login or registration form URLs, and - when a caching proxy is in front - poisoning cached pages for subsequent users. Only deployments running Astro in on-demand/dynamic (SSR) rendering mode through a server adapter such as the Node adapter, behind a proxy that forwards the attacker-supplied X-Forwarded-Host header, and whose code actually consumes Astro.url are affected; statically generated Astro sites are not. Publicly available exploit code exists (the GitHub advisory includes a working curl PoC and a reference repository), but the issue is not listed in CISA KEV and EPSS is low at 0.41% (33rd percentile), with the independent assessment treating it as a moderate, context-dependent integrity risk rather than an emergency.

RemediationAI

Upgrade Astro to 5.14.3 or later, which contains the upstream fix - the patch commit is https://github.com/withastro/astro/commit/6ee63bfac4856f21b4d4633021b3d2ee059e553f and the advisory is https://github.com/withastro/astro/security/advisories/GHSA-5ff5-9fcw-vg88 (note the advisory prose cites 5.14.2 while package metadata lists 5.14.3 as the fixed version, so treat 5.14.3 as the safe target). Where an immediate upgrade is not possible, apply compensating controls that do not depend on the framework: at the reverse proxy, strip or overwrite any client-supplied X-Forwarded-Host header and set it only from the trusted Host value (a one-line nginx proxy_set_header change; trade-off is that legitimate multi-domain or load-balanced setups must be configured explicitly), or disable forwarding of X-Forwarded-* headers entirely if the application does not rely on them. Stop using Astro.url to build canonical links, form actions, or login/registration return URLs until patched - derive the canonical origin from a hardcoded, allowlisted configuration value instead (trade-off: less portability across environments and must be maintained per deployment). To eliminate the stored, cross-user variant, either disable caching for dynamically rendered responses (Cache-Control: no-store/private) or purge the cache after upgrading, and verify that your caching proxy does not use X-Forwarded-Host as part of the cache key; the trade-off is reduced cache hit ratio and higher origin load. Given the publicly available PoC, prioritize any internet-facing, SSR-mode Astro deployment with a caching layer in front.

Affected Packages

npm astro fix: 5.14.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Astro is a JavaScript web framework for building content-focused sites; CPE metadata identifies the affected package as the Node.js build of Astro (cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*). When Astro runs in on-demand/dynamic rendering mode via a server adapter (for example the Node adapter) rather than producing a static build, it reconstructs the request URL exposed to application code as Astro.url. The framework trusts the X-Forwarded-Host request header for that reconstruction without validating it against an allowlist of legitimate domains or against the Host header, so a request carrying a benign Host value plus a mismatched, attacker-chosen X-Forwarded-Host value causes Astro to surface the attacker's host. This is a host-header-injection / unsafe-reflection class of bug (assigned CWE-470, Use of Externally-Controlled Input to Select Classes or Code), and it is dangerous precisely because frameworks commonly recommend Astro.url for canonical links, form actions, and return URLs. The reference deployment pattern - nginx routing on Host while forwarding other headers, sometimes combined with a caching proxy such as Cloudflare configured with a non-zero TTL - turns a per-request reflection into a stored, cross-user problem, since the poisoned host value is cached and served to later visitors. Other frameworks avoid this by allowlisting trusted hosts or by not reflecting these headers at all.

Know when Astro gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
vuln.today AI 5.3 MEDIUM

Remote unauthenticated request with no interaction drives AV:N/AC:L/PR:N/UI:N; reflected host value corrupts output integrity (I:L) with no confidentiality or availability loss.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
popular JS web framework, but only SSR mode behind a cache is affected
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*

More in Astro

View all
CVE-2018-7180 CRITICAL POC
9.8 Feb 17

SQL Injection exists in the Saxum Astro 4.0.14 component for Joomla!. Rated critical severity (CVSS 9.8), this vulnerabi

CVE-2026-25545 HIGH POC
8.6 Feb 24

Astro web framework versions prior to 9.5.4 contain a server-side request forgery vulnerability in error page handling t

CVE-2024-56159 HIGH POC
7.8 Dec 19

Astro is a web framework for content-driven websites. Rated high severity (CVSS 7.8), this vulnerability is remotely exp

CVE-2025-59837 HIGH POC
7.2 Oct 28

Server-side request forgery in Astro's built-in image proxy lets unauthenticated remote attackers force the server to fe

CVE-2025-58179 HIGH POC
7.2 Sep 05

Astro is a web framework for content-driven websites. Rated high severity (CVSS 7.2), this vulnerability is remotely exp

CVE-2025-64764 HIGH POC
7.1 Nov 19

Astro is a web framework. Rated high severity (CVSS 7.1), this vulnerability is remotely exploitable, no authentication

CVE-2025-55303 MEDIUM POC
6.9 Aug 19

Astro is a web framework for content-driven websites. Rated medium severity (CVSS 6.9), this vulnerability is remotely e

CVE-2025-64525 MEDIUM POC
6.5 Nov 13

Astro is a web framework. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploitable, no authenticatio

CVE-2026-27829 MEDIUM POC
6.5 Feb 26

Astro web framework versions 9.0.0 through 9.5.3 fail to validate remote image domains when the inferSize option is enab

CVE-2026-84376 MEDIUM POC
6.3 Sep 02

Base-path prefix bypass in Astro prior to 7.2.4 allows unauthenticated remote attackers to reach protected server-side r

CVE-2025-54793 MEDIUM POC
5.5 Aug 08

Astro is a web framework for content-driven websites. Rated medium severity (CVSS 5.5), this vulnerability is remotely e

CVE-2026-27729 MEDIUM POC
5.9 Feb 24

Memory exhaustion denial of service in Astro 9.0.0 through 9.5.3 allows remote attackers to crash server processes by se

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy