CVE-2025-64745 Astro development server error page vulnerable to reflected Cross-site Scripting

Low 2.7 Published Updated

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.

PackageAffectedFixed in
astro npmFrom 5.2.05.15.6
astro npmFrom 5.2.05.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.

Sources

Also known as GHSA-w2vj-39qv-7vh7.

Is CVE-2025-64745 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free