CVE-2026-25545: Astro Package Suffers from Full-Read SSRF via Host Header Injection
Summary
CVE-2026-25545: Astro has Full-Read SSRF in error rendering via Host: header injection. Affects @astrojs/node versions < 9.5.4. Fixed in 9.5.4. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Astro is a modern static site generator designed to optimize the performance of web applications by allowing developers to build faster websites with less client-side JavaScript. It supports server-side rendering (SSR) and provides a flexible architecture for creating dynamic content. However, a vulnerability has been identified in the Astro package that allows for Server-Side Request Forgery (SSRF) through improper handling of the Host header during error rendering.
Vulnerability Detail
The vulnerability arises when server-side rendered pages return errors with prerendered custom error pages (like 404.astro or 500.astro). By manipulating the Host header, an attacker can redirect requests to their own server, allowing them to access internal resources. The vulnerable code fetches a status URL based on the Host header, which can be exploited to retrieve sensitive information from internal services or cloud metadata endpoints. This SSRF vulnerability can lead to unauthorized access to internal systems, potentially exposing sensitive data.
How To Fix
Minimum fixed version
9.5.4
This is the first release that contains the fix.
npm install @astrojs/node@9.5.4
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can implement validation for the Host header in your application to prevent unauthorized requests. Ensure that only trusted hosts are allowed to be processed, and consider normalizing the Host header before using it in any fetch requests.
Conclusion
The CVE-2026-25545 vulnerability in the Astro package exposes applications to SSRF attacks through improper handling of the Host header during error rendering. It is crucial to update to the patched version (9.5.4 or later) to mitigate this risk. Additionally, implementing header validation can serve as a temporary workaround.
See every vulnerability recorded for @astrojs/node →
FAQ
Server-Side Request Forgery (SSRF) is a security vulnerability that allows an attacker to send crafted requests from a vulnerable server to internal or external resources.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in your software. Visit Vulert Scanner to analyze your package-lock.json without any signup.
An attacker could exploit this vulnerability to access sensitive internal services, potentially leading to data breaches or unauthorized access to cloud metadata.
Yes, you can implement strict validation on the Host header to restrict requests to known and trusted domains as a temporary measure.
The CVSS score for this vulnerability is 6.9, indicating a moderate level of severity.
References
Related vulnerabilities
Recent vulnerabilities recorded for @astrojs/node.