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-64765: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in withastro astro

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

Description

Astro is a web framework. Prior to version 5.15.8, a mismatch exists between how Astro normalizes request paths for routing/rendering and how the application’s middleware reads the path for validation checks. Astro internally applies decodeURI() to determine which route to render, while the middleware uses context.url.pathname without applying the same normalization (decodeURI). This discrepancy may allow attackers to reach protected routes using encoded path variants that pass routing but bypass validation checks. This issue has been patched in version 5.15.8.

AI-Powered Analysis

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

Technical Analysis

CVE-2025-64765 is a path traversal vulnerability classified under CWE-22 affecting the Astro web framework versions prior to 5.15.8. Astro internally uses decodeURI() to normalize request paths for routing and rendering decisions, but its middleware components read the request path from context.url.pathname without applying the same normalization. This discrepancy creates a security gap where attackers can craft encoded path variants that Astro's router will decode and accept as valid routes, while middleware validation checks fail to recognize these variants as protected paths. Consequently, attackers can bypass access controls and reach restricted routes or resources that should be protected. The vulnerability does not require authentication, user interaction, or privileges, and can be exploited remotely over the network. Although no known exploits are currently reported in the wild, the issue poses a risk of unauthorized access to sensitive application endpoints or data. The vulnerability was publicly disclosed and patched in Astro version 5.15.8, which ensures consistent path normalization between routing and middleware validation. The CVSS 4.0 base score is 6.9, indicating a medium severity level due to the ease of exploitation and potential confidentiality impact, though integrity and availability impacts are not evident. This vulnerability highlights the importance of consistent input normalization across all components handling request paths in web frameworks.

Potential Impact

For European organizations, this vulnerability could lead to unauthorized access to protected web application routes, potentially exposing sensitive data or internal functionality. Organizations relying on Astro for web development, especially those with complex middleware validation logic, may inadvertently allow attackers to bypass security controls. This could result in data breaches, unauthorized operations, or further exploitation chains if sensitive administrative or internal APIs are exposed. The impact is particularly relevant for sectors with stringent data protection requirements such as finance, healthcare, and government services. Additionally, organizations with public-facing web applications using vulnerable Astro versions may face reputational damage and regulatory consequences under GDPR if personal data is compromised. The lack of required authentication and user interaction increases the risk of automated exploitation attempts. However, since the vulnerability affects only versions prior to 5.15.8 and requires specific middleware misconfigurations, the overall impact depends on the deployment context and patching status.

Mitigation Recommendations

The primary mitigation is to upgrade all Astro framework instances to version 5.15.8 or later, where the path normalization inconsistency is resolved. Organizations should audit their web applications to identify any use of vulnerable Astro versions and prioritize patching. Additionally, developers should review middleware code to ensure that path validation uses the same normalization methods as the routing logic, ideally applying decodeURI() or equivalent consistently before access control checks. Implementing strict input validation and canonicalization for all request paths can reduce the risk of path traversal attacks. Web application firewalls (WAFs) can be configured to detect and block suspicious encoded path variants that attempt to bypass access controls. Security teams should monitor for unusual access patterns to protected routes and conduct penetration testing focused on path traversal vectors. Finally, maintaining an inventory of web frameworks and dependencies with timely updates is essential to prevent exploitation of similar issues.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-11-10T22:29:34.877Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 691df5b8cb9b476b7d56e491

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

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

Last updated: 11/19/2025, 7:05:13 PM

Views: 5

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