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

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, astro (npm). Vendors: Astro, 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.