CVE-2026-54299: withastro Astro SSRF in prerendered error page fetch

CVE-2026-54299 · Severity: high · CVSS 7.5 · Published 2026-06-22

Astro is a modern web framework that pre-renders certain error pages (404 and 500 errors) for performance. A vulnerability in how Astro handles HTTP requests allows an attacker to manipulate the Host header and trick the framework into fetching error pages from an attacker-controlled server, potentially exposing sensitive information. This affects self-hosted Astro SSR deployments that do not validate the Host header against allowed domains.

Technologies: astro (npm). Vendors: npm.

Quick answers

Is CVE-2026-54299 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-54299 being exploited in the wild.
How severe is CVE-2026-54299?
High severity, with a CVSS score of 7.5, published 22 June 2026.
Which products and versions are affected?
astro (npm) < 6.4.6, SEMVER:introduced=0,fixed=6.4.6.
Is there a fix for CVE-2026-54299?
Yes. astro (npm): upgrade to 6.4.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-54299 attacked?
It is attacked over the network, in a web application.
Am I affected by CVE-2026-54299?
Check whether you run astro (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • astro (npm): upgrade to 6.4.6 or later
    npm install astro@6.4.6

Technical details

The vulnerability is a Server-Side Request Forgery (SSRF) caused by improper input validation in the createRequestFromNodeRequest function. While the allowedDomains configuration option exists, it only validates the X-Forwarded-For header and does not constrain the request URL origin derived from the Host header. When app.render() encounters a 404 or 500 error with a prerendered error route, it constructs the error page URL using the unconstrained origin and fetches it via prerenderedErrorPageFetch (which defaults to global fetch). An attacker can send a crafted request with a malicious Host header (e.g., Host: attacker-host:port), trigger an error by requesting a nonexistent path, and receive the attacker's response reflected back to the client. The fix validates the error page fetch origin against allowedDomains before use, falling back to localhost if the host is not validated, and wraps the fetch in error handling.

Affected products

  • Astro astro <= 6.4.4

Identifiers

  • CVE-2026-54299
  • GHSA-2pvr-wf23-7pc7

Timeline

  • 2026-06-12: disclosed
  • 2026-06-16: advisory
  • 2026-06-16: patched: Version 6.4.6 includes the fix

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.