{"id":"CVE-2025-66202","aliases":["GHSA-whqg-ppgf-wp8c"],"url":"https://o3.security/vulnerability/CVE-2025-66202","summary":"Astro has an Authentication Bypass via Double URL Encoding, a bypass for CVE-2025-64765","details":"# 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```","published":"2025-12-08T23:41:21.976Z","modified":"2026-08-12T03:51:34.926886247Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"epss":{"score":0.00318,"percentile":0.24165,"asOf":"2026-09-01"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"astro","fixedVersion":"5.15.8"}],"fix":{"url":"https://github.com/withastro/astro/commit/6f800813516b07bbe12c666a92937525fddb58ce","label":"withastro/astro@6f80081"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66202.json"},{"type":"ADVISORY","url":"https://github.com/withastro/astro/security/advisories/GHSA-ggxq-hp9w-j794"},{"type":"ADVISORY","url":"https://github.com/withastro/astro/security/advisories/GHSA-whqg-ppgf-wp8c"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66202"},{"type":"FIX","url":"https://github.com/withastro/astro/commit/6f800813516b07bbe12c666a92937525fddb58ce"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64765"},{"type":"PACKAGE","url":"https://github.com/withastro/astro"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:34.926886247Z"}}