{"id":"CVE-2026-126364","aliases":["CVE-2026-126364","GHSA-r3h5-4585-7x3w"],"related":[],"kind":"vulnerability","state":"published","title":"Astro: Image endpoint in @astrojs/node can read files from a case-variant sibling of the output directory on case-sensitive filesystems","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe `/_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.\n\nFor example, with the client output directory at `/srv/app/dist/client/`, a request such as:\n\n```text\n/_image?href=/../../DIST/client/secret.png&w=32&f=png\n```\n\nresolved to `/srv/app/DIST/client/secret.png` and was served, even though that file is outside the output directory.\n\n## Impact\n\nAn unauthenticated attacker can read image files from outside the output directory, but only when all of the following are true:\n\n- The site uses on-demand rendering with the `@astrojs/node` adapter.\n- The server runs on a case-sensitive filesystem.\n- 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.\n\nOnly 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.\n\n## Affected versions\n\n`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.\n\n## Patches\n\nFixed 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.\n\n## Workarounds\n\nUpgrade 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.\n\n## Credits\n\nReported by @zachariah-mithani.","format":"markdown","source":"ghsa"}],"published":"2026-11-12T22:33:17.635Z","modified":"2026-11-17T22:17:21.217Z","severity":{"scorer":"GitHub_M","scheme":"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","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"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","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"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","rating":"MEDIUM"}],"cwes":["CWE-22","CWE-178"],"affected":[{"ranges":[{"version":">= 5.14.3, < 7.4.7","status":"affected"}],"vendor":"withastro","product":"astro","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"11.1.11"}],"ecosystem":"npm","package":"@astrojs/node","purl":"pkg:npm/%40astrojs/node","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"5.14.3","status":"affected","fixed":"7.4.7"}],"ecosystem":"npm","package":"astro","purl":"pkg:npm/astro","source":"ghsa"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-r3h5-4585-7x3w","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/commit/7da442bb286e0c29e1c9e1add6727b7cbf434f1a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/releases/tag/astro@7.4.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126364","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/withastro/astro","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-13T00:37:48.200Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-126364","url":"https://www.cve.org/CVERecord?id=CVE-2026-126364","licence":"CVE Terms of Use","modified":"2026-11-13T00:37:58.791Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r3h5-4585-7x3w","url":"https://github.com/advisories/GHSA-r3h5-4585-7x3w","licence":"CC-BY-4.0","modified":"2026-11-13T18:45:07.651Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-126364","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126364","licence":"Public domain","modified":"2026-11-17T22:17:21.217Z"}],"updatedAt":"2026-11-25T22:59:50.580Z","epss":{"score":0.00384,"percentile":0.34559,"date":"2026-12-01T12:00:22.000Z"}}