# CVE-2026-126364: Path traversal in astro

> Unauthenticated attackers can read image files from case-variant sibling directories on case-sensitive filesystems behind Astro's image endpoint.

- **Severity:** Medium 6.3 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/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
- **Harmful if only installed:** No
- **Needs a specific call:** No
- **Fix available:** No
- **Published:** 12 Nov 2026
- **Updated:** 12 Nov 2026
- **Also known as:** GHSA-r3h5-4585-7x3w

## What is CVE-2026-126364?

CVE-2026-126364 is a medium-severity path traversal vulnerability in withastro astro, published on 12 Nov 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. From 5.14.3 until 7.4.7, Astro's /_image endpoint compared the requested local-image path with the build output directory without preserving case on case-sensitive filesystems. A sibling directory whose path differed from the output directory only by letter case could therefore pass the containment check, allowing an unauthenticated requester to read image files accepted by the image service from outside the output directory. Exploitation required on-demand rendering with the @astrojs/node adapter, a case-sensitive filesystem, and a preexisting case-variant sibling directory; ordinary traversal to unrelated paths was already rejected. This issue is fixed in Astro version 7.4.7.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-178 (Improper Handling of Case Sensitivity)

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

Only installations with a non-default setting turned on are exposed.


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

No fix has been published for CVE-2026-126364 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-126364 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-126364 is a medium-severity path traversal vulnerability in withastro astro, published on 12 Nov 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-126364 in the wild and no public exploit code.
Exposure: Only installations with a non-default setting turned on are exposed.

Affected product: withastro astro. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-126364/ (Markdown: https://insights.sbomify.com/CVE-2026-126364/index.md)
```

## Sources

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

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