{"id":"GHSA-whqg-ppgf-wp8c","revision":"9a8d5efd0b464e648e1fcdf8b4ef7f2f","records":[{"revision":"9a8d5efd0b464e648e1fcdf8b4ef7f2f","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-whqg-ppgf-wp8c","aliases":["CVE-2025-66202"],"title":"Astro has an Authentication Bypass via Double URL Encoding, a bypass for CVE-2025-64765","description":"# Authentication Bypass via Double URL Encoding in Astro\n## Bypass for CVE-2025-64765 / GHSA-ggxq-hp9w-j794\n\n---\n\n### Summary\n\nA **double URL encoding bypass** allows any unauthenticated attacker to bypass path-based authentication checks in Astro middleware, granting unauthorized access to protected routes. While the original CVE-2025-64765 (single URL encoding) was fixed in v5.15.8, the fix is insufficient as it only decodes once. By using double-encoded URLs like `/%2561dmin` instead of `/%61dmin`, attackers can still bypass authentication and access protected resources such as `/admin`, `/api/internal`, or any route protected by middleware pathname checks.\n\n\n## Fix \n\nA more secure fix is just decoding once, then if the request has a %xx format, return a 400 error by using something like :\n\n```\nif (containsEncodedCharacters(pathname)) {\n            // Multi-level encoding detected - reject request\n            return new Response(\n                'Bad Request: Multi-level URL encoding is not allowed',\n                {\n                    status: 400,\n                    headers: { 'Content-Type': 'text/plain' }\n                }\n            );\n        }\n```","state":0,"publishedAt":"2025-12-08T16:26:43+00:00","modifiedAt":"2026-02-04T02:27:12.689316+00:00","affected":[{"ecosystem":"npm","name":"astro","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"5.15.8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/withastro/astro/security/advisories/GHSA-ggxq-hp9w-j794","https://github.com/withastro/astro/security/advisories/GHSA-whqg-ppgf-wp8c","https://nvd.nist.gov/vuln/detail/CVE-2025-64765","https://nvd.nist.gov/vuln/detail/CVE-2025-66202","https://github.com/withastro/astro/commit/6f800813516b07bbe12c666a92937525fddb58ce","https://github.com/withastro/astro"],"sourceUrl":"https://github.com/advisories/GHSA-whqg-ppgf-wp8c","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-whqg-ppgf-wp8c","identifiers":["GHSA-whqg-ppgf-wp8c","CVE-2025-66202"]},"retained":false,"historicalAffected":[]}],"coverage":[]}