CVE-2025-66202: Astro Authentication Bypass Vulnerability
MODERATECVE-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
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).
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.
npm install astro@5.15.8
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
CVE-2025-66202 Affected Astro Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
astro
|
npm |
< 5.15.8
|
5.15.8
|
References
Frequently Asked Questions
What is CVE-2025-66202?
Which Astro versions are affected?
What version fixes CVE-2025-66202?
Is astro affected?
What is the CVSS score of CVE-2025-66202?
What CWE is associated with CVE-2025-66202?
How can I check npm dependencies for CVE-2025-66202?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}