CVE-2026-41321
JSON

2.2low

@astrojs/cloudflare: SSRF via redirect following in Cloudflare image-binding-transform endpoint

Severity
2.2low CVSS:3.1 by GitHub_M
Exploit likelihood
0.25% (higher than 17% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-88gm-j2wx-58h6

Description

@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.

Affected

Product or packageVersionsReported by
withastro @astrojs/cloudflare< 13.1.10CVE List
@astrojs/cloudflare (npm)before 13.1.10GitHub Advisory Database

All scores

GitHub_M2.2low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L
GitHub2.2low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L

Classification

CWE-918

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

@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.

GitHub Advisory Database

Summary

The 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.

All three other image fetch paths in the codebase correctly use { redirect: 'manual' }. This is an incomplete fix for GHSA-qpr4-c339-7vq8.

Confirmed on HEAD.

Root Cause

image-binding-transform.ts line 28:

const content = await (isRemotePath(href) ? fetch(imageSrc) : assets.fetch(imageSrc));

Missing { redirect: 'manual' }. The three protected paths:

// image-passthrough-endpoint.ts:23
response = await fetch(href, { redirect: 'manual' });

// assets/endpoint/shared.ts:11
const res = await fetch(src, { redirect: 'manual' });

// assets/utils/remoteProbe.ts:53
const response = await fetch(url, { redirect: 'manual' });

PoC

Demonstrated with Node.js that fetch() without redirect: 'manual' follows 302 redirects to arbitrary destinations:

# Server A (allowed domain) returns 302 → Server B (internal)
fetch('http://allowed:19741/img.jpg')                        → follows 302 → hits http://internal:19742/secret
fetch('http://allowed:19741/img.jpg', {redirect:'manual'})   → returns 302, internal server NOT hit

Attack 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.

Impact

Bypasses 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.

Suggested Fix

const content = await (isRemotePath(href) ? fetch(imageSrc, { redirect: 'manual' }) : assets.fetch(imageSrc));
NVD (es)

@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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-41321 changed 2026-04-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-88gm-j2wx-58h6 changed 2026-05-05CC-BY-4.0
NVDCVE-2026-41321 changed 2026-10-26Public domain