Astro's middleware authentication checks based on url.pathname can be bypassed via url encoded values
- Severity:
- Medium
Description
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).
Recommendation
Update the astro package to the latest compatible version. Followings are version details:
- Affected version(s): < 5.15.8
- Patched version(s): 5.15.8
References
Related Issues
- Parse Server has a Cross-Site Scripting (XSS) vulnerability via Unescaped Mustache Template Variables - CVE-2025-68115
- Astro Cloudflare adapter has Stored Cross-site Scripting vulnerability in /_image endpoint - CVE-2025-65019
- Astro development server error page is vulnerable to reflected Cross-site Scripting - CVE-2025-64745
- Astro allows unauthorized third-party images in _image endpoint - CVE-2025-55303
- Tags:
- npm
- astro
Anything's wrong? Let us know Last updated on November 27, 2025