---
title: "GHSA-r3h5-4585-7x3w: Astro: Image endpoint in @astrojs/node can read files from a case-variant sibling of the output directory on case-sensitive filesystems"
description: "Moderate severity. Astro: Image endpoint in @astrojs/node can read files from a case-variant sibling of the output directory on case-sensitive filesystems."
url: https://inlinr.com/advisories/GHSA-r3h5-4585-7x3w
lang: en
---

[Packages](https://inlinr.com/packages)

Moderate Vulnerability GHSA-r3h5-4585-7x3w CVE-2026-126364 Published 13 Nov 2026

# Astro: Image endpoint in @astrojs/node can read files from a case-variant sibling of the output directory on case-sensitive filesystems

Your version of @astrojs/node 

Affected releases · [@astrojs/node](https://inlinr.com/packages/@astrojs/node)

- 11.x 11.0.0 – 11.1.11 Fixed in 11.1.12
- 10.x 10.0.0 – 10.1.4 No fix on this line yet
- 9.x 9.0.0 – 9.5.5 No fix on this line yet
- 8.x and older 0.0.2 – 8.3.4 No fix, no longer updated

On 11.x, the newest line:

```
npm install @astrojs/node@11.1.12
```

Every release on a timeline

11.x 

1. Affected

11.0.0 – 11.1.11  
16 releases
2. Fixed

11.1.12 – 11.1.14  
3 releases, latest

10.x 

1. Affected

10.0.0 – 10.1.4  
12 releases

9.x 

1. Affected

9.0.0 – 9.5.5  
28 releases

8.x 

1. Affected

8.0.0 – 8.3.4  
14 releases

7.x 

1. Affected

7.0.0 – 7.0.4  
5 releases

6.x 

1. Affected

6.0.0 – 6.1.0  
6 releases

5.x 

1. Affected

5.0.0 – 5.3.6  
18 releases

4.x 

1. Affected

4.0.0  
1 release

3.x 

1. Affected

3.0.0 – 3.1.1  
3 releases

2.x 

1. Affected

2.0.0 – 2.0.2  
3 releases

1.x 

1. Affected

1.0.0 – 1.1.0  
3 releases

0.x 

1. Affected

0.0.2 – 0.2.1  
10 releases

122 stable releases of @astrojs/node, oldest to newest, one row per major.

Your version of astro 

Affected releases · [astro](https://inlinr.com/packages/astro)

- 7.x 7.0.0 – 7.4.6 Fixed in 7.4.7
- 6.x 6.0.0 – 6.4.8 No fix on this line yet
- 5.x 5.14.3 – 5.18.2 No fix on this line yet

On 7.x, the newest line:

```
npm install astro@7.4.7
```

Every release on a timeline

7.x 

1. Affected

7.0.0 – 7.4.6  
44 releases
2. Fixed

7.4.7 – 7.4.13  
7 releases, latest

6.x 

1. Affected

6.0.0 – 6.4.8  
41 releases

5.x 

1. Not affected

5.0.0 – 5.14.1  
97 releases
2. Affected

5.14.3 – 5.18.2  
40 releases

742 stable releases of astro, oldest to newest, one row per major.

## What happens

Summary

The `/_image` endpoint used by the [@astrojs/node](https://inlinr.com/packages/@astrojs/node) adapter checks that a requested local image is inside the build output directory before reading it from disk. That check compared paths case-insensitively. On case-sensitive filesystems (such as Linux), a directory whose path differs from the output directory only by letter case is a different directory, but it passed the check.

For example, with the client output directory at `/srv/app/dist/client/`, a request such as:

```
/_image?href=/../../DIST/client/secret.png&w=32&f=png
```

resolved to `/srv/app/DIST/client/secret.png` and was served, even though that file is outside the output directory.

Impact

An unauthenticated attacker can read image files from outside the output directory, but only when all of the following are true:

- The site uses on-demand rendering with the [@astrojs/node](https://inlinr.com/packages/@astrojs/node) adapter.
- The server runs on a case-sensitive filesystem.
- A directory exists whose path matches the output directory except for letter case (for example `DIST/client` next to `dist/client`). Such a layout is unusual, and the attacker cannot create it.

Only files the image service accepts can be read. Raster images are returned after resizing; SVG files are returned unchanged. Other file types fail during processing. Plain path traversal outside the output directory (for example `/../../secret.png`) was already rejected and is not affected.

Affected versions

`astro` \>= 5.14.3, <= 7.4.6, when used with [@astrojs/node](https://inlinr.com/packages/@astrojs/node) (all versions up to 11.1.11). The vulnerable image endpoint is provided by `astro` and used by the [@astrojs/node](https://inlinr.com/packages/@astrojs/node) adapter.

Patches

Fixed in `astro` 7.4.7\. The path check now compares paths exactly, and only ignores letter case for Windows drive-letter paths. The fix ships in `astro`, so upgrading [@astrojs/node](https://inlinr.com/packages/@astrojs/node) alone is not enough.

Workarounds

Upgrade to `astro` 7.4.7 or later. Before upgrading, make sure no directory next to the build output directory has a path that differs from it only by letter case.

Credits

Reported by [@zachariah-mithani](https://github.com/zachariah-mithani).

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: low
- **Integrity**: none
- **Availability**: none

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

## References

- [Reference](https://github.com/withastro/astro/security/advisories/GHSA-r3h5-4585-7x3w "https://github.com/withastro/astro/security/advisories/GHSA-r3h5-4585-7x3w")  
github.com/withastro/astro/security/advisories/…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-126364 "https://nvd.nist.gov/vuln/detail/CVE-2026-126364")  
nvd.nist.gov/vuln/detail/CVE-2026-126364
- [Fix commit](https://github.com/withastro/astro/commit/7da442bb286e0c29e1c9e1add6727b7cbf434f1a "https://github.com/withastro/astro/commit/7da442bb286e0c29e1c9e1add6727b7cbf434f1a")  
7da442b
- [Package](https://github.com/withastro/astro "https://github.com/withastro/astro")  
github.com/withastro/astro
- [Reference](https://github.com/withastro/astro/releases/tag/astro@7.4.7 "https://github.com/withastro/astro/releases/tag/astro@7.4.7")  
github.com/withastro/astro/releases/tag/astro@7…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
