CVE-2025-64745: Astro development server error page is vulnerable to reflected Cross-site Scripting
(updated )
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.
References
- github.com/advisories/GHSA-w2vj-39qv-7vh7
- github.com/withastro/astro
- github.com/withastro/astro/blob/5bc37fd5cade62f753aef66efdf40f982379029a/packages/astro/src/template/4xx.ts
- github.com/withastro/astro/commit/790d9425f39bbbb462f1c27615781cd965009f91
- github.com/withastro/astro/pull/12994
- github.com/withastro/astro/security/advisories/GHSA-w2vj-39qv-7vh7
- nvd.nist.gov/vuln/detail/CVE-2025-64745
Code Behaviors & Features
Detect and mitigate CVE-2025-64745 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →