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

Published Apr 23, 2026
·
Updated

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

Other sources

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));

— GitHub

Affected Software

1 affected componentFixes available
npm/@astrojs/cloudflare<13.1.10
13.1.10

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@astrojs/cloudflare to a version that resolves this vulnerability.

    Fixed in 13.1.10
  2. Upgrade

    Upgrade @astrojs/cloudflare to a version that resolves this vulnerability.

    Fixed in 13.1.10

Event History

Apr 23, 2026
Advisory Published
via GitHub·09:52 PM
Data Sourced
via GitHub·09:52 PM
DescriptionSeverityWeaknessAffected Software
Apr 24, 2026
CVE Published
via MITRE·05:04 PM
Data Sourced
via MITRE·05:04 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2026-41321?

CVE-2026-41321 is classified as a critical vulnerability due to its potential for SSRF exploitation.

2

How do I fix CVE-2026-41321?

To remediate CVE-2026-41321, update the @astrojs/cloudflare package to version 13.1.10 or later.

3

What software is affected by CVE-2026-41321?

CVE-2026-41321 affects the @astrojs/cloudflare package versions prior to 13.1.10.

4

What type of vulnerability is CVE-2026-41321?

CVE-2026-41321 is an SSRF (Server-Side Request Forgery) vulnerability.

5

Can CVE-2026-41321 affect my web application?

Yes, if your web application uses the affected versions of the @astrojs/cloudflare package, it may be susceptible to exploitation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203