Skip to main content

Astro CVE-2025-66202

MEDIUM
Use of Non-Canonical URL Paths for Authorization Decisions (CWE-647)
2025-12-09 security-advisories@github.com
6.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify route protected by Astro middleware pathname check
  2. Delivery
    Send request with encoded path variant (/%2561dmin)
  3. Exploit
    Routing resolves to /admin while middleware sees raw path
  4. Execution
    Middleware auth comparison fails to match, redirect skipped
  5. Impact
    Access protected route content unauthenticated

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V6 - Authentication Use of non-canonical URL paths
Exploitation Conditions

Requires the target to be an Astro SSR application running version <5.15.8 (per vendor data) whose middleware enforces authorization by comparing context.url.pathname against literal route strings (e.g. context.url.pathname === '/admin'), the exact pattern shown in Astro's official authentication documentation. The root cause is that Astro applies decodeURI() to resolve the route for rendering but the middleware reads the un-normalized raw pathname, so encoded path variants reach the page while evading the string equality check. Exploitation is unauthenticated and needs no user interaction. LIMITING FACTORS: static/prerendered sites and apps that do not perform pathname-based auth in middleware are unaffected; apps using framework-native or cookie/token-gated access controls independent of raw pathname matching are not vulnerable; the flaw grants access only to routes guarded by this specific middleware pattern, not arbitrary code execution.

Impact

This is a moderate-risk, conditionally-exploitable authentication bypass rather than a broad critical flaw. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N = 6.5 Medium) indicates a network-reachable, low-complexity, unauthenticated attack with limited confidentiality and integrity impact and no availability impact - consistent with gaining access to specific protected routes rather than full system compromise. EPSS is low at 0.31% (22nd percentile), the CVE is NOT on CISA KEV, and no public exploit is flagged in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation. Crucially, exploitability is NOT universal: it only applies to Astro SSR applications whose developers implemented path-based authorization in middleware using context.url.pathname comparisons (e.g. the '/admin' pattern shown in Astro's own authentication docs), which tempers the PR:N network-vector signal. NOTE A DATA CONFLICT: the description states 'the original CVE-2025-64765 was fixed in v5.15.8' yet also says the current issue (a bypass of that insufficient fix) 'is fixed in version 5.15.8' and lists 'vulnerable < 5.15.8, fixed in 5.15.8' - this fixed-version labeling is internally contradictory and should be verified against the GHSA-whqg-ppgf-wp8c advisory, as the real fix may be a later patch (5.15.8+). The signals are otherwise consistent: low EPSS + no KEV + limited CVSS impact point to a genuine but non-emergency patch priority for teams running affected Astro middleware auth patterns.

Exploit ScenarioDerived

An Astro SSR site protects /admin via middleware that redirects unless context.url.pathname equals '/admin'. An unauthenticated attacker requests a double/alternately URL-encoded variant (e.g. /%2561dmin or /%61%64%6d%69%6e); because Astro's routing layer decodes the path to resolve the /admin page while the middleware reads the still-encoded raw pathname, the equality check fails to match and the auth redirect is skipped, serving the protected admin content. No public exploit is identified at time of analysis, though the GHSA advisory includes a concrete bypass example, and the AV:N/AC:L vector makes the request trivial to craft.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 07, 2026

Authentication bypass in Astro framework versions prior to 5.15.8 allows unauthenticated attackers to access protected routes that rely on middleware pathname checks. The flaw stems from a path normalization mismatch: Astro's routing uses decodeURI() on the URL pathname, while middleware receives the raw, un-decoded pathname, enabling encoded path variants (e.g., /%61dmin for /admin) to bypass literal string equality checks. This is a moderate-risk, conditionally-exploitable issue affecting Astro SSR applications that implement pathname-based authorization as shown in Astro's authentication documentation; static sites and apps using other access controls are unaffected. No public exploit identified at time of analysis, and EPSS score is low (0.31%, 22nd percentile).

RemediationAI

Upgrade to Astro 5.15.8 or later, which includes the fix that normalizes URL-encoded paths before middleware execution (commit 6f800813516b07bbe12c666a92937525fddb58ce). If immediate upgrade is not possible, avoid relying on raw pathname string comparisons for authentication; instead, normalize the pathname within middleware (e.g., using decodeURI on context.url.pathname) or use framework-native authentication mechanisms that do not depend on un-normalized path matching. However, such workarounds must be applied carefully as they may not cover all encoding variants. Review the vendor advisories at https://github.com/withastro/astro/security/advisories/GHSA-ggxq-hp9w-j794 and https://github.com/withastro/astro/security/advisories/GHSA-whqg-ppgf-wp8c for additional guidance.

Affected Packages

npm astro fix: 5.15.8

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability is a path normalization mismatch in Astro's request handling. Astro internally applies decodeURI() to determine which route to render, but middleware accesses context.url.pathname without applying the same normalization (see GHSA-ggxq-hp9w-j794). This discrepancy allows attackers to reach protected routes using encoded path variants that pass routing but fail to match middleware's literal string checks. The CWE-647 weakness class concerns the use of incorrectly formatted data leading to security bypass. The affected component is the Node.js server rendering pipeline (CPE: cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*). A fix commit (6f800813516b07bbe12c666a92937525fddb58ce) introduces a normalized URL helper that decodes the pathname before middleware checks, ensuring encoded paths like /%61dmin are properly decoded to /admin.

Know when Astro gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
vuln.today AI 6.5 MEDIUM

Remote unauthenticated attacker trivially crafts encoded paths (AV:N/AC:L/PR:N/UI:N); impact limited to accessing specific protected routes, so C:L/I:L and A:N with no scope change.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionNVD

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Medium
popular modern JS framework, but only SSR apps with pathname-based middleware auth affected
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Affected Products (CPE)NVD

cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*

More in Astro

View all
CVE-2018-7180 CRITICAL POC
9.8 Feb 17

SQL Injection exists in the Saxum Astro 4.0.14 component for Joomla!. Rated critical severity (CVSS 9.8), this vulnerabi

CVE-2026-25545 HIGH POC
8.6 Feb 24

Astro web framework versions prior to 9.5.4 contain a server-side request forgery vulnerability in error page handling t

CVE-2024-56159 HIGH POC
7.8 Dec 19

Astro is a web framework for content-driven websites. Rated high severity (CVSS 7.8), this vulnerability is remotely exp

CVE-2025-59837 HIGH POC
7.2 Oct 28

Server-side request forgery in Astro's built-in image proxy lets unauthenticated remote attackers force the server to fe

CVE-2025-58179 HIGH POC
7.2 Sep 05

Astro is a web framework for content-driven websites. Rated high severity (CVSS 7.2), this vulnerability is remotely exp

CVE-2025-64764 HIGH POC
7.1 Nov 19

Astro is a web framework. Rated high severity (CVSS 7.1), this vulnerability is remotely exploitable, no authentication

CVE-2025-55303 MEDIUM POC
6.9 Aug 19

Astro is a web framework for content-driven websites. Rated medium severity (CVSS 6.9), this vulnerability is remotely e

CVE-2025-64525 MEDIUM POC
6.5 Nov 13

Astro is a web framework. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploitable, no authenticatio

CVE-2025-61925 MEDIUM POC
6.5 Oct 10

Unvalidated reflection of the X-Forwarded-Host header in Astro (versions before 5.14.3) lets remote, unauthenticated att

CVE-2026-27829 MEDIUM POC
6.5 Feb 26

Astro web framework versions 9.0.0 through 9.5.3 fail to validate remote image domains when the inferSize option is enab

CVE-2026-84376 MEDIUM POC
6.3 Sep 02

Base-path prefix bypass in Astro prior to 7.2.4 allows unauthenticated remote attackers to reach protected server-side r

CVE-2025-54793 MEDIUM POC
5.5 Aug 08

Astro is a web framework for content-driven websites. Rated medium severity (CVSS 5.5), this vulnerability is remotely e

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy