{"id":"CVE-2025-66202","aliases":["CVE-2025-66202","GHSA-whqg-ppgf-wp8c"],"related":[],"kind":"vulnerability","state":"published","title":"Astro has an Authentication Bypass via Double URL Encoding, a bypass for CVE-2025-64765","summary":"Astro is a web framework. Versions 5.15.7 and below have a double URL encoding bypass which 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 was fixed in v5.15.8, the fix is insufficient as it only decodes once. By using double-encoded URLs, attackers can still bypass authentication and access any route protected by middleware pathname checks. This issue is fixed in version 5.15.8.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Astro is a web framework. Versions 5.15.7 and below have a double URL encoding bypass which 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 was fixed in v5.15.8, the fix is insufficient as it only decodes once. By using double-encoded URLs, attackers can still bypass authentication and access any route protected by middleware pathname checks. This issue is fixed in version 5.15.8.","source":"cvelist"},{"lang":"en","text":"# 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```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Astro es un web framework. Las versiones 5.15.7 e inferiores tienen un bypass de doble codificación de URL que permite a cualquier atacante no autenticado omitir las comprobaciones de autenticación basadas en rutas en el middleware de Astro, otorgando acceso no autorizado a rutas protegidas. Aunque el CVE-2025-64765 original fue corregido en la v5.15.8, la corrección es insuficiente ya que solo decodifica una vez. Al usar URLs doblemente codificadas, los atacantes aún pueden omitir la autenticación y acceder a cualquier ruta protegida por las comprobaciones de nombre de ruta del middleware. Este problema está corregido en la versión 5.15.8.","source":"nvd"}],"published":"2025-12-08T16:26:43.000Z","modified":"2026-10-07T20:10:01.970Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-647"],"affected":[{"ranges":[{"version":"< 5.15.8","status":"affected"}],"vendor":"withastro","product":"astro","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.15.8"}],"ecosystem":"npm","package":"astro","purl":"pkg:npm/astro","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.15.8"}],"vendor":"astro","product":"astro","cpe":"cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-whqg-ppgf-wp8c","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/security/advisories/GHSA-ggxq-hp9w-j794","tags":["not-applicable","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/commit/6f800813516b07bbe12c666a92937525fddb58ce","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64765","tags":["advisory"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66202","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/withastro/astro","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-12-09T14:18:21.955Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66202","url":"https://www.cve.org/CVERecord?id=CVE-2025-66202","licence":"CVE Terms of Use","modified":"2025-12-09T16:04:07.923Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-whqg-ppgf-wp8c","url":"https://github.com/advisories/GHSA-whqg-ppgf-wp8c","licence":"CC-BY-4.0","modified":"2026-02-04T02:27:12.689Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66202","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66202","licence":"Public domain","modified":"2026-10-07T20:10:01.970Z"}],"updatedAt":"2026-11-25T22:59:08.456Z","epss":{"score":0.00333,"percentile":0.28616,"date":"2026-12-01T12:00:22.000Z"}}