MEDIUM · CVSS 4.0 EPSS 0.4% · 32th percentile CWE-178CWE-22

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

Published 2026-11-13 · Updated 2026-11-13 · Also known as GHSA-r3h5-4585-7x3w

Summary

The image endpoint in @astrojs/node improperly validates paths case-insensitively on case-sensitive filesystems, allowing unauthorized file reads from sibling directories. Engineering teams using Astro with the Node adapter on Linux or other case-sensitive filesystems should upgrade immediately.

Who is affected

Unauthenticated attackers can read image files from outside the build output directory if the server runs on a case-sensitive filesystem and a case-variant sibling directory exists. Only files accepted by the image service can be read, such as processed raster images or unchanged SVGs, and the attacker cannot create the required sibling directory structure themselves.

Exploitability

Exploitation requires high attack complexity because it depends on specific server filesystem characteristics and an unusual directory layout. The attack can be executed over the network without authentication or user interaction, resulting in low confidentiality impact.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm @astrojs/node >= 0, <= 11.1.11 not published -
npm astro >= 5.14.3, < 7.4.7 7.4.7 npm install [email protected]

Tracked tools affected

Astro · Astro security advisories · Fixed in Astro 7.4.7 release notes

CVSS 4.0 vector

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

Attack vectorNetwork
Attack complexityHigh
Attack requirementsPresent
Privileges requiredNone
User interactionNone
Confidentiality (vulnerable system)Low
Integrity (vulnerable system)None
Availability (vulnerable system)None
Confidentiality (subsequent systems)None
Integrity (subsequent systems)None
Availability (subsequent systems)None

Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.

FAQ

What causes the vulnerability?

The path validation check for requested local images compared directories case-insensitively, which incorrectly accepted paths in case-variant sibling directories on case-sensitive filesystems like Linux.

Is upgrading @astrojs/node sufficient to fix the vulnerability?

No, the vulnerable image endpoint is provided by astro, so you must upgrade astro to version 7.4.7 or later.

Can an attacker use this flaw for standard path traversal outside the output directory?

No, plain path traversal attacks like requesting arbitrary files outside the output directory were already rejected and are unaffected.

Original advisory description
## Summary The `/_image` endpoint used by the `@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: ```text /_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` 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` (all versions up to 11.1.11). The vulnerable image endpoint is provided by `astro` and used by the `@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` 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.

References

Source records: GHSA-r3h5-4585-7x3w (OSV.dev) · EPSS by FIRST, 2026-11-21.