CVE-2025-64745 Astro development server error page vulnerable to reflected Cross-site Scripting
Attackers can execute arbitrary JavaScript in developer browsers via malicious URLs in Astro's development server error pages when trailingSlash is enabled.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-64745?
CVE-2025-64745 is a low-severity cross-site scripting vulnerability in withastro astro, published on 13 Nov 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
Astro is a web framework. Starting in version 5.2.0 and prior to version 5.15.6, a Reflected Cross-Site Scripting (XSS) vulnerability exists in Astro's development server error pages when the `trailingSlash` configuration option is used. An attacker can inject arbitrary JavaScript code that executes in the victim's browser context by crafting a malicious URL. While this vulnerability only affects the development server and not production builds, it could be exploited to compromise developer environments through social engineering or malicious links. Version 5.15.6 fixes the issue.
Weakness: CWE-79
Which versions are affected by CVE-2025-64745?
2 open source packages ship an affected version, including astro. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
astro npm | From 5.2.0 | 5.15.6 |
astro npm | From 5.2.0 | 5.15.6 |
Products include Astro Astro.
How do I fix CVE-2025-64745?
Upgrade astro to 5.15.6 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2025-64745 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64745 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-w2vj-39qv-7vh7.