Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-65019: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro

0
Medium
VulnerabilityCVE-2025-65019cvecve-2025-65019cwe-79
Published: Wed Nov 19 2025 (11/19/2025, 16:40:47 UTC)
Source: CVE Database V5
Vendor/Project: withastro
Product: astro

Description

Astro is a web framework. Prior to version 5.15.9, when using Astro's Cloudflare adapter (@astrojs/cloudflare) with output: 'server', the image optimization endpoint (/_image) contains a critical vulnerability in the isRemoteAllowed() function that unconditionally allows data: protocol URLs. This enables Cross-Site Scripting (XSS) attacks through malicious SVG payloads, bypassing domain restrictions and Content Security Policy protections. This issue has been patched in version 5.15.9.

AI-Powered Analysis

AILast updated: 11/19/2025, 17:07:20 UTC

Technical Analysis

CVE-2025-65019 is a Cross-Site Scripting (XSS) vulnerability identified in the Astro web framework, specifically affecting versions prior to 5.15.9 when deployed with the Cloudflare adapter (@astrojs/cloudflare) configured for server output mode. The vulnerability resides in the image optimization endpoint (_/image), where the isRemoteAllowed() function is responsible for validating remote image URLs. Due to improper input validation, this function unconditionally permits URLs using the data: protocol. This oversight allows attackers to craft malicious SVG payloads embedded within data: URLs that bypass domain whitelisting and Content Security Policy (CSP) protections. When a victim accesses a vulnerable Astro-powered site, the malicious SVG can execute arbitrary JavaScript in the context of the site, leading to potential theft of sensitive information, session hijacking, or other client-side attacks. The vulnerability does not require authentication but does require user interaction (e.g., visiting a crafted URL). The CVSS v3.1 base score is 5.4 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, but requiring user interaction and limited impact on confidentiality and integrity. No known active exploits have been reported in the wild as of the published date (November 19, 2025). The issue has been addressed in Astro version 5.15.9 by properly restricting allowed protocols in the isRemoteAllowed() function, effectively blocking unsafe data: URLs and preventing malicious payload injection.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to web applications built using the Astro framework with the Cloudflare adapter in server output mode. Exploitation could lead to client-side script execution, enabling attackers to steal user credentials, session tokens, or perform actions on behalf of users, undermining confidentiality and integrity of user data. Although the vulnerability does not affect server availability or integrity directly, successful XSS attacks can facilitate phishing, malware distribution, or further exploitation. Organizations in sectors with high web interaction such as e-commerce, finance, healthcare, and government could face reputational damage and regulatory consequences under GDPR if user data is compromised. The bypass of CSP protections increases the risk even in environments with strong security policies. Since no authentication is required, any visitor to a vulnerable site could be targeted, increasing the attack surface. However, the requirement for user interaction and the medium severity score somewhat limit the immediacy of impact compared to more critical vulnerabilities.

Mitigation Recommendations

European organizations should immediately upgrade all Astro framework instances to version 5.15.9 or later to apply the official patch that restricts allowed protocols in the isRemoteAllowed() function. In addition, review and tighten Content Security Policy configurations to minimize reliance on protocol-based filtering and consider disabling or restricting the use of data: URLs where feasible. Implement input validation and sanitization on all user-supplied data, especially for image URLs and SVG content. Conduct thorough security testing of web applications using Astro, including penetration testing focused on XSS vectors. Monitor web traffic and logs for suspicious requests targeting the /_image endpoint. Educate developers on secure coding practices related to URL validation and SVG handling. If immediate patching is not possible, consider deploying Web Application Firewalls (WAFs) with custom rules to block data: protocol usage in image URLs. Finally, maintain an incident response plan to quickly address any detected exploitation attempts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-11-13T15:36:51.680Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 691df5b8cb9b476b7d56e495

Added to database: 11/19/2025, 4:52:08 PM

Last enriched: 11/19/2025, 5:07:20 PM

Last updated: 11/19/2025, 5:59:27 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats