Astro's middleware authentication checks rely on context.url.pathname, which does not decode URL-encoded characters, while Astro's internal routing uses a decoded pathname. This mismatch allows attackers to bypass authentication checks by using encoded path variants (e.g., /%61dmin instead of /admin) to access protected routes. The issue affects Astro versions prior to 5.15.8 and has a CVSS 4.0 base score of 6.9 (medium severity).