Incorrect Authorization Affecting astro package, versions <7.2.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.41% (34th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Incorrect Authorization vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-ASTRO-19643569
  • published8 Sept 2026
  • disclosed2 Sept 2026
  • creditRyoga-exe

Introduced: 2 Sep 2026

NewCVE-2026-84376  (opens in a new tab)
CWE-863  (opens in a new tab)

How to fix?

Upgrade astro to version 7.2.4 or higher.

Overview

astro is an Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

Affected versions of this package are vulnerable to Incorrect Authorization in BaseApp.removeBase, FetchState pathname stripping, and matchRequest in the routing and app base-handling code. An attacker can reach protected routes by sending a request whose pathname extends the configured base with a non-segment suffix, such as /appX/admin, causing routing to resolve the request as /admin while middleware still inspects the unstripped /appX/admin pathname. This lets an unauthenticated remote attacker bypass pathname-based middleware checks and access routes the application intended to protect under a non-root base.

Workarounds

  • Reject requests whose pathname does not begin with the configured base followed by a path-segment boundary, so paths like /appX/admin, /app2/admin, or /app-/admin are not treated as being under /app and cannot bypass pathname-based middleware authorization.
  • Do not rely solely on prefix checks of context.url.pathname for authorization when using a non-root base; enforce route access in a way that only permits the exact base path or paths under base/, preventing the router and middleware from disagreeing about whether a request is protected.

CVSS Base Scores

version 4.0
version 3.1