# CVE-2026-84376: Astro: Authorization bypass from missing path-segment boundary check when stripping the configured base

> Attackers can bypass middleware authorization in Astro apps using a non-root base path by exploiting a missing path-segment boundary check.

- **Severity:** Medium 6.3 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Sep 2026
- **Updated:** 4 Sep 2026
- **Also known as:** CLSA-2026-1790175733, CLSA-2026-1790176521, CLSA-2026-1790185871, CLSA-2026-1790457826, CLSA-2026-1790459384, CLSA-2026-1792160952, CLSA-2026-1792161569, CLSA-2026-1792161570, CLSA-2026-1792161571, CLSA-2026-1792161572, CLSA-2026-1792161713, CLSA-2026-1792161714, CLSA-2026-1792161715, CLSA-2026-1792161716, CLSA-2026-1792161717, CLSA-2026-1792161800, CLSA-2026-1792161801, CLSA-2026-1792161802, CLSA-2026-1792161803, CLSA-2026-1792161865, CLSA-2026-1792161866, CLSA-2026-1792161867, GHSA-376h-93r7-7g6f

## What is CVE-2026-84376?

CVE-2026-84376 is a medium-severity authentication bypass vulnerability in withastro astro, published on 2 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-187 (Partial String Comparison)

## Which versions are affected by CVE-2026-84376?

2 open source packages ship an affected version, including astro.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `astro` | npm | All versions | 7.2.4 |
| `astro` | npm | All versions | 7.2.4 |

## How do I fix CVE-2026-84376?

Upgrade astro to 7.2.4 or later.

## Is CVE-2026-84376 being exploited?

There is no known exploitation of CVE-2026-84376 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-84376 and fix it if it is affected.

What it is: CVE-2026-84376 is a medium-severity authentication bypass vulnerability in withastro astro, published on 2 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-84376 in the wild and no public exploit code.

Affected packages and fixed versions:
- astro (npm): affected all versions; fixed in 7.2.4
- astro (npm): affected all versions; fixed in 7.2.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-84376/ (Markdown: https://insights.sbomify.com/CVE-2026-84376/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-84376
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-84376
- OSV: https://osv.dev/vulnerability/CVE-2026-84376

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-84376/
Summaries are generated and may contain mistakes; the official description above is the record.
