Astro Cloudflare CVE-2026-41321
LOWSeverity by source
AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L
/_image is publicly accessible without authentication (PR:N); exploiting an open redirect on an allowed domain requires AC:H; blind SSRF enables partial internal host probing (C:L); no integrity or availability impact is described.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
4DescriptionGitHub Advisory
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));
AnalysisAI
SSRF via redirect-following in the @astrojs/cloudflare integration's image-binding-transform endpoint allows remote attackers to bypass the image.domains and image.remotePatterns domain allowlist by exploiting an open redirect on an already-permitted domain. The root cause is a single missing { redirect: 'manual' } option on line 28 of image-binding-transform.ts - an inconsistency that was correctly applied in all three other image fetch paths in the same codebase. This is an incomplete fix for the prior HIGH-rated GHSA-qpr4-c339-7vq8, and a public proof-of-concept is confirmed in advisory GHSA-88gm-j2wx-58h6.
Technical ContextAI
The affected package is @astrojs/cloudflare (CPE: pkg:npm/@astrojs_cloudflare), the official Astro framework integration for deploying sites on Cloudflare Workers using the cloudflare-binding image service. When handling remote image transforms, the integration calls the JavaScript Fetch API, which defaults to redirect: 'follow' - transparently resolving HTTP 3xx responses to their destination before returning. The domain allowlist check (isRemoteAllowed()) is applied only to the original request URL, not to any redirect target, creating a classic CWE-918 (Server-Side Request Forgery) bypass. All three sibling fetch paths - image-passthrough-endpoint.ts:23, assets/endpoint/shared.ts:11, and assets/utils/remoteProbe.ts:53 - correctly pass { redirect: 'manual' }. The prior fix for GHSA-qpr4-c339-7vq8 patched those paths but missed image-binding-transform.ts:28, leaving this code path unprotected and confirmed exploitable on HEAD at the time of disclosure.
RemediationAI
Upgrade @astrojs/cloudflare to version 13.1.10 or later; the fix adds { redirect: 'manual' } to the vulnerable fetch() call in image-binding-transform.ts and returns a 404 for any 3xx response, consistent with all other image fetch paths. The patch is available at https://github.com/withastro/astro/commit/a43eb4b40b4f81530e3c9b5e2959495900320433 and the release at https://github.com/withastro/astro/releases/tag/%40astrojs%2Fcloudflare%4013.1.10. As a compensating control prior to patching, audit the image.domains and image.remotePatterns allowlist and remove any entries for large CDNs or third-party hosts known to support open redirects (e.g., generic URL-shortener domains or CDNs with ?url= redirect parameters); this reduces the exploitable attack surface without eliminating the underlying vulnerability and may break legitimate image sources as a trade-off. Deploying a Web Application Firewall rule to validate that the href parameter on /_image requests resolves to an allowlisted destination before forwarding is an additional layer, but adds operational complexity.
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic
The AES-NI implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not consider memory allocation during a
Same weakness CWE-918 – Server-Side Request Forgery (SSRF)
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-88gm-j2wx-58h6