CVE-2025-66202: Astro Authentication Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-whqg-ppgf-wp8c
CVSS 6.5
CWE-647
Published
Advisory Summary

CVE-2025-66202 is a MODERATE (CVSS 6.5) authentication bypass vulnerability (CWE-647: Use of Non-Canonical URL Paths for Authorization Decisions) affecting Astro libraries in the npm ecosystem. The issue involves astro has an authentication bypass via double url encoding, a bypass for cve-2025-64765. Remediation is available by upgrading affected packages to version 5.15.8.

CVE-2025-66202 at a Glance

CVE Identifier CVE-2025-66202
GHSA Identifier GHSA-whqg-ppgf-wp8c
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-647: Use of Non-Canonical URL Paths for Authorization Decisions
Affected Product Astro
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-66202

To remediate this vulnerability, upgrade all affected Astro dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

astro fixed: 5.15.8
npm install astro@5.15.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls astro

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-66202, inspect your project dependencies using npm:

npm ls astro

Analyze the terminal output to locate any version of Astro in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.15.8), your application is affected.

Note: The npm ls astro command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-647: Use of Non-Canonical URL Paths for Authorization Decisions, where the product defines policy namespaces and makes authorization decisions based on the assumption that a url is canonical. this can allow a non-canonical url to bypass the authorization. In Astro, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# Authentication Bypass via Double URL Encoding in Astro ## Bypass for CVE-2025-64765 / GHSA-ggxq-hp9w-j794 --- ### Summary A **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. ## Fix A more secure fix is just decoding once, then if the request has a %xx format, return a 400 error by using something like : ``` if (containsEncodedCharacters(pathname)) { // Multi-level encoding detected - reject request return new Response( 'Bad Request: Multi-level URL encoding is not allowed', { status: 400, headers: { 'Content-Type': 'text/plain' } } ); } ```

CVE-2025-66202 Affected Astro Versions

1 component(s)
Fixed Versions:
5.15.8
Product / Package Ecosystem Affected Versions Fixed Version
astro
npm
< 5.15.8
5.15.8

References

Frequently Asked Questions

What is CVE-2025-66202?
CVE-2025-66202 is a security vulnerability in Astro involving Astro has an Authentication Bypass via Double URL Encoding, a bypass for CVE-2025-64765 under CWE-647: Use of Non-Canonical URL Paths for Authorization Decisions.
Which Astro versions are affected?
Affected versions include releases prior to 5.15.8 across affected packages: astro.
What version fixes CVE-2025-66202?
Upgrading to 5.15.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is astro affected?
Yes, astro is affected in releases prior to 5.15.8. Upgrade your dependency to 5.15.8 or later.
What is the CVSS score of CVE-2025-66202?
CVE-2025-66202 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2025-66202?
CVE-2025-66202 is classified under CWE-647: Use of Non-Canonical URL Paths for Authorization Decisions (The product defines policy namespaces and makes authorization decisions based on the assumption that a URL is canonical. This can allow a non-canonical URL to bypass the authorization.).
How can I check npm dependencies for CVE-2025-66202?
Run the dependency tree command: 'npm ls astro'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-whqg-ppgf-wp8c",
  "modified" : "2025-12-09T16:28:41Z",
  "published" : "2025-12-08T16:26:43Z",
  "aliases" : [ "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```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "astro"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.15.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/withastro/astro/security/advisories/GHSA-ggxq-hp9w-j794"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/withastro/astro/security/advisories/GHSA-whqg-ppgf-wp8c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64765"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66202"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/withastro/astro/commit/6f800813516b07bbe12c666a92937525fddb58ce"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/withastro/astro"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-647" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-08T16:26:43Z",
    "nvd_published_at" : "2025-12-09T00:15:48Z"
  }
}