Servers and applications
CVE-2026-126364
Image endpoint in @astrojs/node can read files from a case-variant sibling of the output directory on case-sensitive filesystems
- Severity
- Medium 6.3
- Published
- 9 Nov 2026
- Last changed
- 13 Nov 2026
- Added to UpHeron
- 12 Nov 2026
- Fixed in
- 7.4.7
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Read some data
- CVSS 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- Also known as
- GHSA-r3h5-4585-7x3w
- Sources
- CVE Program, Project advisories (GitHub)
Description
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:
resolved to /srv/app/DIST/client/secret.png and was served, even though that file is outside the output directory.
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).
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.
Affected software
| Software | Affected versions |
|---|---|
AstroServers and applications · cna:withastro|astro |
|
AstroServers and applications · github:withastro/astro |
|
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-126364
- GitHub Advisory Database https://github.com/advisories/GHSA-r3h5-4585-7x3w
- github.com https://github.com/withastro/astro/security/advisories/GHSA-r3h5-4585-7x3w