CVE-2026-59731: Astro: Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch
Astro 6.4.7 appears to reintroduce a middleware authorization bypass pattern when a request path is encoded more deeply than the newly introduced iterative URL decoder’s maximum decoding depth.
The issue occurs because Astro performs authorization decisions on a partially decoded pathname after reaching a decoding iteration cap, while later route matching logic performs an additional decodeURI() operation and resolves the request to a protected route.
As a result, middleware and route matching may operate on different pathname representations, enabling authorization bypasses under specific application patterns.
Potential CWE: CWE-647 – Use of Non-Canonical URL Paths for Authorization Decisions
References
- github.com/advisories/GHSA-vj59-8hwv-xxmv
- github.com/withastro/astro/commit/27c80ea92248993e5fce94b2c26d87d611ab6785
- github.com/withastro/astro/pull/17109
- github.com/withastro/astro/releases/tag/astro@6.4.8
- github.com/withastro/astro/security/advisories/GHSA-vj59-8hwv-xxmv
- nvd.nist.gov/vuln/detail/CVE-2026-59731
Code Behaviors & Features
Detect and mitigate CVE-2026-59731 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →