CVE-2026-84376: Astro: Authorization bypass from missing path-segment boundary check when stripping the configured base
Astro is a web framework for content-driven websites. Prior to 7.2.4, Astro stripped a configured non-root base path from request pathnames using a string-prefix check without verifying a path-segment boundary. With base "/app", a request to "/appX/admin" resolved internally to the protected "/admin" route while middleware observed "/appX/admin" in context.url.pathname. In applications that authorize base-prefixed routes by inspecting context.url.pathname, an unauthenticated remote attacker could bypass pathname-based middleware authorization and reach protected routes. This issue is fixed in version 7.2.4.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Astroto a version that resolves this vulnerability.Fixed in 7.2.4
Event History
Frequently Asked Questions
Which applications are exposed to this bypass?
Applications using Astro before 7.2.4 with a configured non-root base path are affected when their middleware authorizes requests by inspecting context.url.pathname for base-prefixed routes. The described example uses a base of "/app".
What does an attacker need to exploit it?
An unauthenticated remote attacker needs to send a request whose pathname begins with the configured base string but does not end at a path-segment boundary, such as "/appX/admin" when the base is "/app". This can cause middleware to see the attacker-controlled pathname while routing resolves the request to a protected route.
Are default Astro deployments affected?
The issue requires a configured non-root base path. Deployments using the root base are not described as affected.
How can I determine whether my application may already be vulnerable?
Review the Astro version, the configured base path, and middleware authorization logic. An application may be vulnerable if it runs a version earlier than 7.2.4, uses a non-root base, and makes authorization decisions from context.url.pathname.
What should be done to remediate the issue?
Upgrade Astro to version 7.2.4. If upgrading cannot occur immediately, review and avoid relying solely on context.url.pathname-based authorization for base-prefixed routes.