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

CVE-2025-65019

CVE-2025-65019 Cross-Site Scripting in Astro
📅 PUBLISHED: 2025-11-19 16:40 UTC 🔄 UPDATED: 2026-09-23 20:30 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.26%
👁️
0.26% probability
6.4× 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
5.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-65019 is a Cross-Site Scripting (XSS) vulnerability in the Astro web framework, specifically affecting deployments using the @astrojs/cloudflare adapter with output: 'server'. The vulnerability resides in the image optimization endpoint (/_image), where the isRemoteAllowed() function unconditionally permits data: protocol URLs. This allows an attacker to inject malicious SVG payloads, bypassing domain restrictions and Content Security Policy (CSP) protections. The vulnerability has a CVSS score of 5.4 (Medium) and is currently unpatched in versions prior to 5.15.9. No public exploit code or proof-of-concept is available at this time.

⚡ 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

This vulnerability affects the Astro npm package ecosystem, specifically the @astrojs/cloudflare adapter. Organizations using Astro with Cloudflare Workers or Pages in server mode are at risk. The supply chain risk is moderate, as the vulnerability is in a first-party adapter, not a third-party dependency. Users should update to Astro 5.15.9 or later to mitigate the risk.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Base Score: 5.4 (Medium)
  • Attack Vector (AV): Network (N) - Exploitable remotely.
  • Attack Complexity (AC): Low (L) - No special conditions required.
  • Privileges Required (PR): None (N) - No authentication needed.
  • User Interaction (UI): Required (R) - Victim must click or load a crafted link.
  • Scope (S): Changed (C) - Impact extends beyond the vulnerable component.
  • Confidentiality (C): Low (L) - Limited information disclosure.
  • Integrity (I): Low (L) - Limited ability to modify content.
  • Availability (A): None (N) - No impact on availability.

Threat Level: Medium. While the CVSS score is moderate, the ability to bypass CSP and domain restrictions elevates the risk in environments with strict security policies.

Deep Dive & Mechanics

The vulnerability is in the isRemoteAllowed() function within the @astrojs/cloudflare adapter. This function is responsible for validating URLs passed to the image optimization endpoint (/_image). The flaw is that the function unconditionally allows data: protocol URLs, which can contain arbitrary data, including malicious SVG content.

Attack Flow:

  1. An attacker crafts a URL like: https://victim.com/_image?href=data:image/svg+xml,<svg onload=alert(1)>
  2. The isRemoteAllowed() function checks the URL and, due to the bug, permits the data: protocol.
  3. The image optimization endpoint processes the URL and returns an SVG image containing the malicious payload.
  4. When a victim's browser loads this image, the SVG executes the JavaScript payload, leading to XSS.

Why it bypasses CSP: The data: protocol is often allowed in CSP directives for images (img-src data:), but the vulnerability allows the attacker to inject script into the SVG, which executes in the context of the page, bypassing typical CSP protections.

Vulnerable vs. Patched Code

Vulnerable Code (prior to 5.15.9):

// In @astrojs/cloudflare adapter
function isRemoteAllowed(url) {
  // Bug: No check for data: protocol
  return true; // Unconditionally allows all URLs
}

Patched Code (5.15.9):

// In @astrojs/cloudflare adapter
function isRemoteAllowed(url) {
  // Fix: Explicitly block data: protocol
  if (url.startsWith('data:')) {
    return false;
  }
  // Additional domain validation logic
  return allowedDomains.some(domain => url.startsWith(domain));
}

The patch adds a check to reject any URL starting with data:, preventing the injection of malicious SVG payloads.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • Astro application using @astrojs/cloudflare adapter with output: 'server'
  • Version prior to 5.15.9

Exploitation Steps:

  1. Identify a target running the vulnerable Astro version.
  2. Craft a malicious SVG payload:
    <svg xmlns="http://www.w3.org/2000/svg" onload="alert('XSS')">
      <rect width="100" height="100" fill="red"/>
    </svg>
    
  3. URL-encode the payload and construct the exploit URL:
    https://victim.com/_image?href=data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20onload%3D%22alert%28%27XSS%27%29%22%3E%3Crect%20width%3D%22100%22%20height%3D%22100%22%20fill%3D%22red%22%2F%3E%3C%2Fsvg%3E
    
  4. Send the link to a victim or embed it in a page.
  5. When the victim loads the URL, the SVG executes the JavaScript.

Note: No public exploit code is available; this is a theoretical exploitation based on the vulnerability description.

Blue Team (Defensive)

Detection:

  • Monitor logs for requests to /_image with href parameters containing data: protocol.
  • Look for unusual SVG content in image optimization requests.

Hunting:

  • Search for data:image/svg+xml in web server logs.
  • Check for unexpected CSP violations related to img-src or script-src.

Response:

  • Immediately update to Astro 5.15.9 or later.
  • If immediate patching is not possible, implement a WAF rule to block data: protocol in /_image requests.

Indicators of Compromise (IOCs)

  • URL Pattern: /_image?href=data:image/svg+xml,...
  • Log Entry: Requests to /_image with data: protocol in the href parameter.
  • Network Traffic: HTTP requests containing data:image/svg+xml in the query string.
  • File Hashes: No specific file hashes; the vulnerability is in the code logic, not a specific binary.

Detection Engineering

YARA Rule

rule CVE_2025_65019_Astro_XSS {
    meta:
        description = "Detects attempts to exploit CVE-2025-65019 in Astro Cloudflare adapter"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-65019"
    strings:
        $data_protocol = /\/_image\?href=data:/ nocase
        $svg_payload = /<svg[^>]*onload=/ nocase
    condition:
        $data_protocol or $svg_payload
}

Sigma Rule

title: CVE-2025-65019 Astro Cloudflare Adapter XSS Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests attempting to exploit CVE-2025-65019 via data: protocol in /_image endpoint
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains: "/_image?href=data:"
    condition: selection
falsepositives:
    - Legitimate use of data: URIs in image optimization (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-65019 Astro Cloudflare Adapter XSS Attempt"; flow:to_server; content:"/_image?href=data:"; http_uri; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Patch: Update Astro to version 5.15.9 or later.
  2. WAF Rule: Block requests to /_image with data: protocol in the href parameter.
  3. CSP Hardening: Add object-src 'none' and script-src 'strict-dynamic' to CSP headers.

Long-term Measures:

  • Implement input validation for all URL parameters in image optimization endpoints.
  • Regularly audit dependencies and adapters for security vulnerabilities.
  • Use a Web Application Firewall (WAF) with virtual patching capabilities.

Workaround (if patching is delayed):

  • Disable the image optimization endpoint by configuring the Cloudflare adapter to not use /_image or by adding a middleware that rejects data: URLs.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-65019/ · 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.