{"id":"CVE-2026-41321","aliases":["CVE-2026-41321","GHSA-88gm-j2wx-58h6"],"related":[],"kind":"vulnerability","state":"published","title":"@astrojs/cloudflare: SSRF via redirect following in Cloudflare image-binding-transform endpoint","summary":"@astrojs/cloudflare is an SSR adapter for use with Cloudflare Workers targets. Prior to 13.1.10, the fetch() call for remote images in packages/integrations/cloudflare/src/utils/image-binding-transform.ts uses the default redirect: 'follow' behavior. This allows the Cloudflare Worker to follow HTTP redirects to arbitrary URLs, bypassing the isRemoteAllowed() domain allowlist check which only validates the initial URL. This vulnerabiity is caused by an incomplete fix for CVE-2025-58179. This vulnerability is fixed in 13.1.10.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"@astrojs/cloudflare is an SSR adapter for use with Cloudflare Workers targets. Prior to 13.1.10, the fetch() call for remote images in packages/integrations/cloudflare/src/utils/image-binding-transform.ts uses the default redirect: 'follow' behavior. This allows the Cloudflare Worker to follow HTTP redirects to arbitrary URLs, bypassing the isRemoteAllowed() domain allowlist check which only validates the initial URL. This vulnerabiity is caused by an incomplete fix for CVE-2025-58179. This vulnerability is fixed in 13.1.10.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe `fetch()` call for remote images in `packages/integrations/cloudflare/src/utils/image-binding-transform.ts` (line 28) uses the default `redirect: 'follow'` behavior. This allows the Cloudflare Worker to follow HTTP redirects to arbitrary URLs, bypassing the `isRemoteAllowed()` domain allowlist check which only validates the initial URL.\n\nAll three other image fetch paths in the codebase correctly use `{ redirect: 'manual' }`. This is an incomplete fix for GHSA-qpr4-c339-7vq8.\n\nConfirmed on HEAD.\n\n## Root Cause\n\n`image-binding-transform.ts` line 28:\n\n    const content = await (isRemotePath(href) ? fetch(imageSrc) : assets.fetch(imageSrc));\n\nMissing `{ redirect: 'manual' }`. The three protected paths:\n\n    // image-passthrough-endpoint.ts:23\n    response = await fetch(href, { redirect: 'manual' });\n\n    // assets/endpoint/shared.ts:11\n    const res = await fetch(src, { redirect: 'manual' });\n\n    // assets/utils/remoteProbe.ts:53\n    const response = await fetch(url, { redirect: 'manual' });\n\n## PoC\n\nDemonstrated with Node.js that `fetch()` without `redirect: 'manual'` follows 302 redirects to arbitrary destinations:\n\n    # Server A (allowed domain) returns 302 → Server B (internal)\n    fetch('http://allowed:19741/img.jpg')                        → follows 302 → hits http://internal:19742/secret\n    fetch('http://allowed:19741/img.jpg', {redirect:'manual'})   → returns 302, internal server NOT hit\n\nAttack path: attacker finds an open redirect on an allowed domain, crafts `/_image?href=https://allowed-cdn.com/redirect?url=http://internal-service/`, and the Worker follows the redirect to the unauthorized destination.\n\n## Impact\n\nBypasses the `image.domains` and `image.remotePatterns` allowlist for the default Cloudflare image service (`cloudflare-binding`). Enables blind SSRF to domains not in the allowlist. Same vulnerability class as GHSA-qpr4-c339-7vq8 (HIGH) which fixed the passthrough endpoint but missed this one.\n\n## Suggested Fix\n\n    const content = await (isRemotePath(href) ? fetch(imageSrc, { redirect: 'manual' }) : assets.fetch(imageSrc));","format":"markdown","source":"ghsa"},{"lang":"es","text":"@astrojs/cloudflare es un adaptador SSR para usar con objetivos de Cloudflare Workers. Antes de la versión 13.1.10, la llamada a fetch() para imágenes remotas en packages/integrations/cloudflare/src/utils/image-binding-transform.ts utiliza el comportamiento predeterminado redirect: ’follow’. Esto permite al Cloudflare Worker seguir redirecciones HTTP a URLs arbitrarias, eludiendo la comprobación de lista de permitidos de dominio isRemoteAllowed() que solo valida la URL inicial. Esta vulnerabilidad es causada por una corrección incompleta para CVE-2025-58179. Esta vulnerabilidad está corregida en la versión 13.1.10.","source":"nvd"}],"published":"2026-04-23T21:52:03.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L","score":2.2,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L","score":2.2,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L","score":2.2,"rating":"LOW"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 13.1.10","status":"affected"}],"vendor":"withastro","product":"@astrojs/cloudflare","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"13.1.10"}],"ecosystem":"npm","package":"@astrojs/cloudflare","purl":"pkg:npm/%40astrojs/cloudflare","source":"ghsa"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-88gm-j2wx-58h6","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41321","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/withastro/astro/commit/a43eb4b40b4f81530e3c9b5e2959495900320433","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-qpr4-c339-7vq8","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/withastro/astro","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/withastro/astro/releases/tag/%40astrojs%2Fcloudflare%4013.1.10","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-24T18:27:06.347Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41321","url":"https://www.cve.org/CVERecord?id=CVE-2026-41321","licence":"CVE Terms of Use","modified":"2026-04-24T18:33:24.408Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-88gm-j2wx-58h6","url":"https://github.com/advisories/GHSA-88gm-j2wx-58h6","licence":"CC-BY-4.0","modified":"2026-05-05T16:05:51.817Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41321","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41321","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:19.550Z","epss":{"score":0.00252,"percentile":0.17773,"date":"2026-12-01T12:00:22.000Z"}}