All vulnerabilities

Servers and applications

CVE-2026-84376

Authorization bypass from missing path-segment boundary check when stripping the configured base

Severity
Medium
Published
27 Aug 2026
Last changed
2 Sept 2026
Added to UpHeron
3 Nov 2026
Fixed in
7.2.4
Exploit chance
0.7% in the next 30 daysHigher than 54% of CVEs. EPSS by FIRST, 19 Nov 2026
Also known as
GHSA-376h-93r7-7g6f
Sources
Project advisories (GitHub)

Description

Astro stripped a configured base path from request pathnames using a string-prefix check that did not verify a path-segment boundary. With base: "/app", a request to /appX/admin was treated as being under the base and resolved internally to the /admin route, while middleware still observed the public pathname /appX/admin. Middleware that authorizes routes by inspecting context.url.pathname could therefore be bypassed.

An unauthenticated remote attacker can bypass pathname-based middleware authorization in applications that:

  • Configure a non-root base.
  • Protect base-prefixed routes in middleware using context.url.pathname.

Because routing and middleware resolved different effective pathnames, a request such as /appX/admin (or other single-character extensions like /app2/admin or /app-/admin) reached the protected /admin route without passing the middleware check that guards /app/admin.

From withastro/astro's security advisory. Shortened; the full text is there.

Workarounds

Upgrade to astro 7.2.4 or later. As a mitigation before upgrading, avoid relying solely on prefix checks of context.url.pathname for authorization, or reject requests whose pathname does not begin with the configured base followed by a path-segment boundary.

Workarounds as given by withastro/astro's security advisory.

Affected software

SoftwareAffected versions
AstroServers and applications · github:withastro/astro
  • Every version before 7.2.4

About Astro

The web framework for content-driven websites.

From its GitHub repository.
Developers who used it in the past year
4.5%Stack Overflow Developer Survey 2025, 2025
Weekly downloads (npm)
11,910,147npm, 15 Nov 2026
GitHub stars
63,954GitHub, 15 Nov 2026
Forks
3,922GitHub, 15 Nov 2026
Latest release
@astrojs/[email protected]GitHub, 15 Nov 2026
Released
13 Nov 2026GitHub
First published on GitHub
15 Mar 2021GitHub

References