☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 2.7 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-64745

CVE-2025-64745 Cross-Site Scripting in Astro
📅 PUBLISHED: 2025-11-13 20:26 UTC 🔄 UPDATED: 2026-09-23 20:37 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.24%
👁️
0.24% probability
6.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059.007
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
2.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-64745 is a Reflected Cross-Site Scripting (XSS) vulnerability affecting Astro, a popular web framework. The flaw exists in the development server's error pages when the trailingSlash configuration option is enabled. An attacker can craft a malicious URL that, when visited by a developer, executes arbitrary JavaScript in the context of the developer's browser. This vulnerability is limited to the development server and does not impact production builds. However, it poses a significant risk to developer environments through social engineering attacks. The vulnerability has been patched in Astro version 5.15.6.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Astro is distributed via the npm registry. Developers should ensure their package.json and lock files are updated to version 5.15.6 or later. The vulnerability does not affect the production build output, but the development server is a critical part of the development workflow. Compromise of a developer's environment could lead to supply chain attacks, such as code injection or credential theft.

CVSS Breakdown & Threat Level

  • CVSS Score: 2.7 (Low)
  • Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
  • Attack Vector (AV): Network – The vulnerability can be exploited remotely.
  • Attack Complexity (AC): High – Exploitation requires the trailingSlash option to be enabled and the victim to interact with a malicious link.
  • Privileges Required (PR): None – No authentication is needed.
  • User Interaction (UI): Required – The victim must click a crafted link.
  • Scope (S): Unchanged – The vulnerability does not affect other components.
  • Confidentiality (C): Low – Limited information disclosure is possible.
  • Integrity (I): None – No data modification.
  • Availability (A): None – No denial of service.

Threat Level: Low. The vulnerability is confined to the development server and requires user interaction. However, it can be leveraged in targeted attacks against developers.

Deep Dive & Mechanics

The vulnerability resides in Astro's development server error handling. When the trailingSlash configuration option is set (e.g., trailingSlash: 'always' or trailingSlash: 'never'), the server may reflect user-supplied input in error pages without proper sanitization. Specifically, a crafted URL containing malicious JavaScript can be injected into the error response. The browser then executes the script in the context of the development server's origin.

Root Cause: Insufficient output encoding of URL parameters in error page templates when trailingSlash is active.

Attack Scenario:

  1. An attacker identifies a developer using Astro with trailingSlash enabled.
  2. The attacker crafts a URL like: http://localhost:4321/%3Cscript%3Ealert('XSS')%3C/script%3E
  3. The developer clicks the link (e.g., via phishing email or chat message).
  4. The Astro dev server returns an error page reflecting the malicious payload.
  5. The browser executes the script, potentially stealing session cookies, tokens, or performing actions on behalf of the developer.

Vulnerable vs. Patched Code

Vulnerable Code (Astro < 5.15.6): The error page template likely used a raw interpolation of the URL path without escaping.

// Vulnerable: Direct interpolation
const errorMessage = `Path not found: ${url.pathname}`;

Patched Code (Astro >= 5.15.6): The fix introduces proper HTML encoding of user input before rendering.

// Patched: Escaped output
import { escapeHtml } from 'astro/utils';
const errorMessage = `Path not found: ${escapeHtml(url.pathname)}`;

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Astro project with trailingSlash enabled (e.g., trailingSlash: 'always' in astro.config.mjs).
  • Development server running on localhost:4321.

Exploit Steps:

  1. Start the Astro dev server.
  2. Craft a malicious URL:
    http://localhost:4321/%3Cimg%20src=x%20onerror=alert(1)%3E
    
  3. Send the link to the victim developer.
  4. When the victim visits the URL, the XSS payload executes.

Proof-of-Concept (PoC) URL:

http://localhost:4321/%3Cscript%3Ealert('CVE-2025-64745')%3C/script%3E

Blue Team (Detection & Prevention)

Detection:

  • Monitor for unusual URLs containing script tags or event handlers in development server logs.
  • Use browser-based XSS filters (e.g., X-XSS-Protection header).
  • Implement Content Security Policy (CSP) headers in development mode.

Prevention:

  • Upgrade to Astro 5.15.6 or later.
  • Disable trailingSlash in development if not required.
  • Use a web application firewall (WAF) to block malicious payloads.
  • Educate developers about phishing risks.

Indicators of Compromise (IOCs)

  • URL Patterns:
    • http://localhost:4321/*<script>*
    • http://localhost:4321/*<img onerror=*
    • http://localhost:4321/*%3Cscript%3E*
  • Log Entries:
    • GET /<script>alert(1)</script> in Astro dev server logs.
  • Network Traffic:
    • Outbound connections from developer machine to attacker-controlled domains (if payload exfiltrates data).

Detection Engineering

YARA Rule

rule CVE_2025_64745_Astro_XSS {
    meta:
        description = "Detects Astro dev server error pages with XSS payloads"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-64745"
    strings:
        $xss_payload = /<script[^>]*>.*<\/script>/i
        $img_onerror = /<img[^>]+onerror=/i
        $svg_onload = /<svg[^>]+onload=/i
    condition:
        any of them
}

Sigma Rule

title: Astro Dev Server Reflected XSS
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects reflected XSS attempts against Astro development server
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: astro
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains:
            - '<script'
            - '<img'
            - '<svg'
            - 'onerror='
            - 'onload='
            - 'onclick='
    condition: selection
falsepositives:
    - Legitimate use of script tags in development (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-64745 Astro Dev Server XSS Attempt"; flow:to_server,established; content:"GET"; http_method; content:"<script"; http_uri; nocase; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate:

  1. Upgrade Astro to version 5.15.6 or later:
    npm install astro@latest
    
  2. Verify the update:
    npm list astro
    

Long-term:

  • Implement strict Content Security Policy (CSP) headers in development.
  • Use input validation and output encoding for all user-supplied data.
  • Regularly update dependencies and monitor for security advisories.
  • Conduct security training for developers on XSS risks.

Workaround:

  • Disable trailingSlash in astro.config.mjs:
    export default defineConfig({
      trailingSlash: 'ignore' // or remove the option
    });
    

Report generated by Valters IT DevSecOps Intelligence Unit

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-64745/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.