CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

GHSA-vj59-8hwv-xxmv: Astro: Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch

highCVSS 8.2CVE-2026-59731
Astro 6.4.7 Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch Summary 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 Vulnerable Pattern Middleware authorization sees: /%61dmin Later rewrite route matching sees: /admin This discrepancy allows a request that bypasses middleware checks to subsequently resolve to a protected route. Root Cause Iterative Decoding Logic PR #16967 introduced iterative URI decoding: let iterations = 0; while (decoded !== pathname && iterations < 10) { pathname = decoded; try { decoded = decodeURI(pathname); } catch { // decodeURI can fail when a decoded literal '%' forms an // invalid sequence with adjacent characters. break; } iterations++; } return decoded; The intent was to ensure middleware receives a fully decoded canonical pathname. However, once the iteration cap is reached, Astro returns the partially decoded value instead of rejecting the request. Rewrite Route Matching Later, Astro performs another decode during route matching: const decodedPathname = decodeURI(pathname); Consequently: Middleware pathname: /%61dmin Route matcher: /admin This creates a canonicalization mismatch between authorization logic and routing logic. Proof of Concept Middleware import { defineMiddleware } from 'astro:middleware'; export const on

Details

Source
GitHub Security Advisories (INTL · database · site)
Severity
high — CVSS 8.2
Published
2026-07-20
Last updated
2026-07-20
Exploitation
Not in CISA KEV at last sync

Original advisory: https://github.com/advisories/GHSA-vj59-8hwv-xxmv

Exploitation outlook

EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.

Referenced CVEs

CVECSIRTS overviewExternal
CVE-2026-59731coverage & exploitation statusNVD · CVE.org

Same CVEs, other sources

How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.

More from GitHub Security Advisories