CVE-2025-64745
JavaScript vulnerability analysis and mitigation

Overview

A Reflected Cross-Site Scripting (XSS) vulnerability (CVE-2025-64745) was discovered in Astro's development server error pages when using the trailingSlash configuration option. The vulnerability affects versions >= 5.2.0 and was patched in version 5.15.6. This security issue was disclosed on November 13, 2025, and primarily impacts the development server environment (GitHub Advisory).

Technical details

The vulnerability exists in the trailingSlashMismatchTemplate function within astro/packages/astro/src/template/4xx.ts. The issue stems from the corrected variable, derived from user-controlled pathname parameter, being directly interpolated into HTML without proper escaping. While the pathname variable is escaped elsewhere (line 114: escape(pathname)), the corrected variable remains unsanitized before insertion into both href attributes and link text. The vulnerability was introduced in commit 536175528 through PR #12994, which implemented trailing slash redirection for on-demand rendered pages (GitHub Advisory, Miggo).

Impact

While this vulnerability only affects the development server and not production builds, it could potentially be exploited to compromise developer environments through social engineering or malicious links. The vulnerability allows attackers to inject arbitrary JavaScript code that executes in the victim's browser context (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Astro version 5.15.6. Users should upgrade to this version or later to mitigate the risk. The fix involves properly escaping the corrected variable before its insertion into the HTML template (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-55182CRITICAL10
  • JavaScriptJavaScript
  • react-server-dom-webpack
NoYesDec 03, 2025
CVE-2025-66032HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesDec 03, 2025
CVE-2025-66412HIGH8.5
  • JavaScriptJavaScript
  • @angular/compiler
NoYesDec 01, 2025
CVE-2025-66415MEDIUM6.9
  • JavaScriptJavaScript
  • @fastify/reply-from
NoYesDec 01, 2025
CVE-2025-66404MEDIUM6.4
  • JavaScriptJavaScript
  • mcp-server-kubernetes
NoYesDec 03, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management