# CVE-2025-66202: Astro authentication bypass via double URL encoding

Source: https://junglewise.ai/threats/cve-2025-66202-astro-authentication-bypass-via-double-url-encoding  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-12-09. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2025-66202 · Severity: medium · CVSS 6.5 · Published 2025-12-09

Astro is a popular web framework used to build fast, modern websites. An attacker can bypass middleware-based authentication checks by sending requests with specially crafted double-encoded URLs, gaining unauthorized access to protected admin pages or API endpoints without valid credentials. This is a bypass of the earlier single URL encoding fix, as the current patch only decodes once.

Technologies: [Astro](https://junglewise.ai/threats/technologies/astro-astro), [astro (npm)](https://junglewise.ai/threats/technologies/astro). Vendors: [Astro](https://junglewise.ai/threats/vendors/astro), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2025-66202 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-66202 being exploited in the wild.

**How severe is CVE-2025-66202?** Medium severity, with a CVSS score of 6.5, published 9 December 2025.

**Which products and versions are affected?** astro (npm) SEMVER:introduced=0,fixed=5.15.8.

**Is there a fix for CVE-2025-66202?** Yes. astro (npm): upgrade to 5.15.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-66202 attacked?** It is attacked over the network.

**Am I affected by CVE-2025-66202?** Check whether you run Astro or astro (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- astro (npm): upgrade to 5.15.8 or later

  ```sh
  npm install astro@5.15.8
  ```


## Technical details

The vulnerability is a path normalization bypass (CWE-647) that exploits insufficient URL decoding in Astro's middleware context. Astro internally decodes request paths once using decodeURI() for routing decisions, but the middleware receives context.url.pathname without the same normalization. Attackers can send double-encoded URLs (e.g., /%2561dmin to reach /admin) to bypass pathname-based authentication checks. The attack requires no authentication, privileges, or user interaction and is remotely exploitable over the network. The fix in v5.15.8 for the original CVE-2025-64765 is insufficient because it only decodes once; a more robust solution would detect multi-level encoding and reject such requests with a 400 error.

## Affected products

- The Astro Technology Company Astro < 5.15.8

## Identifiers

- CVE-2025-66202
- GHSA-whqg-ppgf-wp8c

## Timeline

- 2025-12-06: disclosed
- 2025-12-08: advisory

## References

- [https://github.com/withastro/astro/security/advisories/GHSA-ggxq-hp9w-j794](https://github.com/withastro/astro/security/advisories/GHSA-ggxq-hp9w-j794)
- [https://github.com/withastro/astro/security/advisories/GHSA-whqg-ppgf-wp8c](https://github.com/withastro/astro/security/advisories/GHSA-whqg-ppgf-wp8c)

## Related threats

- [Astro case-sensitive path bypass in image endpoint](https://junglewise.ai/threats/cve-2026-126364-astro-is-a-web-framework-for-content-driven-websites-from-5-14-3)
- [Astro HTML injection in dynamic element rendering](https://junglewise.ai/threats/cve-2026-126361-astro-is-a-web-framework-for-content-driven-websites-prior-to-7)
- [Astro HTML injection in script and style element rendering](https://junglewise.ai/threats/cve-2026-114128-astro-is-a-web-framework-for-content-driven-websites-prior-to-7)
- [Astro CSS injection in View Transition animation values](https://junglewise.ai/threats/cve-2026-114127-astro-is-a-web-framework-for-content-driven-websites-from-7-1-0)
- [Astro remote code execution via AVIF image processing](https://junglewise.ai/threats/astro-remote-code-execution-via-avif-image-processing-6b99ffe8)
