Summary
CVE-2026-59731 is a high-severity authentication bypass vulnerability in the Astro web framework (withastro/astro), affecting version 6.4.7. The flaw stems from a URL canonicalization mismatch between middleware-level authorization logic and the rewrite route-matching stage, enabling unauthenticated remote attackers to access middleware-protected routes by supplying a sufficiently encoded URL path. It carries a CVSS v3.1 base score of 8.2 (High) and is classified under CWE-647 (Use of Non-Canonical URL Paths for Authorization Decisions).
Technical details
- Root cause: Astro’s iterative URI decoder applies a fixed maximum number of decoding passes. When that cap is reached, the framework makes the authorization decision based on a partially decoded pathname rather than the fully resolved one (CWE-647). The rewrite route-matching stage that executes after middleware authorization performs one additional
decodeURI()call, resolving the path to a different, fully decoded representation — one that may match a protected route the authorization check never evaluated. - Trigger conditions: The target application must be running Astro in Server-Side Rendering (SSR) mode with middleware that enforces pathname-based access control, and rewrite route matching must be active downstream of the middleware authorization check.
- Attack vector: A remote, unauthenticated attacker sends an HTTP request whose URL path is encoded enough times to exhaust the decoder’s iteration limit. Middleware evaluates the obfuscated, partially decoded path, finds no match against protected route patterns, and allows the request to proceed. The downstream rewrite router then performs its final
decodeURI()pass, resolving the path to the intended protected route (e.g.,/admin) and serving the protected content. - Impact: Unauthenticated access to middleware-protected routes. CVSS assigns high confidentiality impact (exposure of protected content) and low integrity impact. No availability impact.
This vulnerability continues a documented class of URL normalization/decoding inconsistency flaws in Astro, following CVE-2025-64765 and CVE-2025-66202, which exploited similar encoding bypass techniques against earlier Astro middleware implementations.
Affected software
- withastro/astro version 6.4.7
Severity
CVSS v3.1 Base Score: 8.2 (High)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Mitigation and recommended actions
- Immediate: Upgrade Astro to version 6.4.8, which contains the vendor fix addressing the URL decoder canonicalization mismatch (commit
27c80ea, pull request #17109). - If immediate patching is not possible: Apply WAF or reverse-proxy rules to reject requests whose URL paths contain excessive consecutive levels of percent-encoding before they reach the application, and restrict internet-facing access to Astro SSR applications where operationally feasible.
IONIX Status
The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

