{"id":"CVE-2026-54299","aliases":["CVE-2026-54299","GHSA-2pvr-wf23-7pc7"],"related":[],"kind":"vulnerability","state":"published","title":"Astro: Host-header full-read SSRF in core prerendered error-page fetch (prerenderedErrorPageFetch default + unvalidated createRequestFromNodeRequest URL)","summary":"Astro is a web framework. Prior to 6.4.6, Astro SSR apps with prerendered error pages (/404 or /500 using export const prerender = true) fetch those pages over HTTP at runtime when an error occurs. The URL for this fetch is derived from request.url, which in turn gets its origin from the incoming Host header. When the Host header is not validated against allowedDomains, an attacker can point the fetch at an arbitrary host and read the response. This vulnerability is fixed in 6.4.6.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Astro is a web framework. Prior to 6.4.6, Astro SSR apps with prerendered error pages (/404 or /500 using export const prerender = true) fetch those pages over HTTP at runtime when an error occurs. The URL for this fetch is derived from request.url, which in turn gets its origin from the incoming Host header. When the Host header is not validated against allowedDomains, an attacker can point the fetch at an arbitrary host and read the response. This vulnerability is fixed in 6.4.6.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nAstro SSR apps with prerendered error pages (`/404` or `/500` using `export const prerender = true`) fetch those pages over HTTP at runtime when an error occurs. The URL for this fetch is derived from `request.url`, which in turn gets its origin from the incoming `Host` header. When the `Host` header is not validated against `allowedDomains`, an attacker can point the fetch at an arbitrary host and read the response.\n\n## Who is affected\n\nThis affects SSR deployments that:\n\n1. Have a prerendered 404 or 500 page\n2. Use `createRequestFromNodeRequest` from `astro/app/node` with `app.render()` **without** overriding `prerenderedErrorPageFetch` — this includes custom servers built on the public API and third-party adapters\n\n**Not affected:**\n- `@astrojs/node` >= 9.5.4 (reads error pages from disk)\n- `@astrojs/cloudflare` (uses the ASSETS binding)\n- The dev server (renders error pages in-process)\n\n## How it works\n\n`createRequestFromNodeRequest` builds `request.url` from the raw `Host` / `:authority` header. The `allowedDomains` option is accepted but only gates `X-Forwarded-For` — it does not constrain the URL origin. (The public `createRequest` does fall back to `localhost` for unvalidated hosts; this internal builder did not.)\n\nWhen `app.render()` encounters a 404 or 500 with a prerendered error route, `default-handler.ts` constructs the error page URL using the origin from `request.url` and fetches it via `prerenderedErrorPageFetch`, which defaults to global `fetch`. The response body is served to the client.\n\nAn attacker sends a request with `Host: attacker-host:port`, triggers an error (e.g., requesting a nonexistent path for a 404), and receives the response from the attacker-controlled host reflected back.\n\n## Remediation\n\nThe error page fetch origin is now validated against `allowedDomains` before use. When the host is validated, the original origin is preserved. Otherwise, it falls back to `localhost`. The fetch is also wrapped in a try/catch so that connection failures degrade gracefully to a plain error response.\n\n## Credit\n\n5ud0 / Tarmo Technologies","format":"markdown","source":"ghsa"},{"lang":"es","text":"Astro es un framework web. Antes de la versión 6.4.6, las aplicaciones Astro SSR con páginas de error prerrenderizadas (/404 o /500 usando export const prerender = true) obtienen esas páginas a través de HTTP en tiempo de ejecución cuando ocurre un error. La URL para esta obtención se deriva de request.url, que a su vez obtiene su origen del encabezado Host entrante. Cuando el encabezado Host no se valida contra allowedDomains, un atacante puede dirigir la obtención a un host arbitrario y leer la respuesta. Esta vulnerabilidad se corrige en la versión 6.4.6.","source":"nvd"}],"published":"2026-06-16T14:38:06.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-20","CWE-918"],"affected":[{"ranges":[{"version":"< 6.4.6","status":"affected"}],"vendor":"withastro","product":"astro","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"6.4.6"}],"ecosystem":"npm","package":"astro","purl":"pkg:npm/astro","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.4.6"}],"vendor":"astro","product":"astro","cpe":"cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-2pvr-wf23-7pc7","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54299","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-06-23T14:50:10.334Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54299","url":"https://www.cve.org/CVERecord?id=CVE-2026-54299","licence":"CVE Terms of Use","modified":"2026-06-23T15:06:45.902Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2pvr-wf23-7pc7","url":"https://github.com/advisories/GHSA-2pvr-wf23-7pc7","licence":"CC-BY-4.0","modified":"2026-08-12T20:45:07.787Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54299","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54299","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:25.406Z","epss":{"score":0.00333,"percentile":0.18939,"date":"2026-11-30T12:00:22.000Z"}}