Skip to content

🚨 [security] Update @astrojs/cloudflare 12.6.13 → 13.6.0 (major) - #430

Closed
depfu[bot] wants to merge 1 commit into
mainfrom
depfu/update/npm/@astrojs/cloudflare-13.6.0
Closed

🚨 [security] Update @astrojs/cloudflare 12.6.13 → 13.6.0 (major)#430
depfu[bot] wants to merge 1 commit into
mainfrom
depfu/update/npm/@astrojs/cloudflare-13.6.0

Conversation

@depfu

@depfu depfu Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ @​astrojs/cloudflare (12.6.13 → 13.6.0) · Repo · Changelog

Security Advisories 🚨

🚨 Cloudflare has SSRF via redirect following through its image-binding-transform endpoint (incomplete fix for GHSA-qpr4)

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

🆕 @​cloudflare/vite-plugin (added, 1.40.0)

🆕 @​shikijs/primitive (added, 4.2.0)

🆕 @​cloudflare/workerd-darwin-64 (added, 1.20260603.1)

🆕 @​cloudflare/workerd-darwin-arm64 (added, 1.20260603.1)

🆕 @​cloudflare/workerd-linux-64 (added, 1.20260603.1)

🆕 @​cloudflare/workerd-linux-arm64 (added, 1.20260603.1)

🆕 @​cloudflare/workerd-windows-64 (added, 1.20260603.1)

🆕 miniflare (added, 4.20260603.0)

🆕 workerd (added, 1.20260603.1)

🆕 wrangler (added, 4.98.0)

🆕 @​astrojs/internal-helpers (added, 0.10.0)

🆕 @​shikijs/core (added, 4.2.0)

🆕 @​shikijs/engine-javascript (added, 4.2.0)

🆕 @​shikijs/engine-oniguruma (added, 4.2.0)

🆕 @​shikijs/langs (added, 4.2.0)

🆕 @​shikijs/themes (added, 4.2.0)

🆕 @​shikijs/types (added, 4.2.0)

🆕 shiki (added, 4.2.0)

🆕 vite (added, 7.3.5)

🗑️ @​cloudflare/workers-types (removed)

🗑️ @​cloudflare/kv-asset-handler (removed)

🗑️ @​cloudflare/unenv-preset (removed)

🗑️ @​cloudflare/workerd-darwin-64 (removed)

🗑️ @​cloudflare/workerd-darwin-64 (removed)

🗑️ @​cloudflare/workerd-darwin-arm64 (removed)

🗑️ @​cloudflare/workerd-darwin-arm64 (removed)

🗑️ @​cloudflare/workerd-linux-64 (removed)

🗑️ @​cloudflare/workerd-linux-64 (removed)

🗑️ @​cloudflare/workerd-linux-arm64 (removed)

🗑️ @​cloudflare/workerd-linux-arm64 (removed)

🗑️ @​cloudflare/workerd-windows-64 (removed)

🗑️ @​cloudflare/workerd-windows-64 (removed)

🗑️ @​esbuild/aix-ppc64 (removed)

🗑️ @​esbuild/android-arm (removed)

🗑️ @​esbuild/android-arm64 (removed)

🗑️ @​esbuild/android-x64 (removed)

🗑️ @​esbuild/darwin-arm64 (removed)

🗑️ @​esbuild/darwin-x64 (removed)

🗑️ @​esbuild/freebsd-arm64 (removed)

🗑️ @​esbuild/freebsd-x64 (removed)

🗑️ @​esbuild/linux-arm (removed)

🗑️ @​esbuild/linux-arm64 (removed)

🗑️ @​esbuild/linux-ia32 (removed)

🗑️ @​esbuild/linux-loong64 (removed)

🗑️ @​esbuild/linux-mips64el (removed)

🗑️ @​esbuild/linux-ppc64 (removed)

🗑️ @​esbuild/linux-riscv64 (removed)

🗑️ @​esbuild/linux-s390x (removed)

🗑️ @​esbuild/linux-x64 (removed)

🗑️ @​esbuild/netbsd-arm64 (removed)

🗑️ @​esbuild/netbsd-x64 (removed)

🗑️ @​esbuild/openbsd-arm64 (removed)

🗑️ @​esbuild/openbsd-x64 (removed)

🗑️ @​esbuild/openharmony-arm64 (removed)

🗑️ @​esbuild/sunos-x64 (removed)

🗑️ @​esbuild/win32-arm64 (removed)

🗑️ @​esbuild/win32-ia32 (removed)

🗑️ @​esbuild/win32-x64 (removed)

🗑️ esbuild (removed)

🗑️ miniflare (removed)

🗑️ miniflare (removed)

🗑️ undici (removed)

🗑️ workerd (removed)

🗑️ workerd (removed)

🗑️ wrangler (removed)

🗑️ wrangler (removed)

🗑️ ws (removed)

🗑️ typescript (removed)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploying head-start with  Cloudflare Pages  Cloudflare Pages

Latest commit: 03bd608
Status:🚫  Build failed.

View logs

@depfu depfu Bot added the depfu label Jun 2, 2026
@depfu
depfu Bot force-pushed the depfu/update/npm/@astrojs/cloudflare-13.6.0 branch from 1ee3187 to 5ccce61 Compare June 5, 2026 13:10
@depfu
depfu Bot force-pushed the depfu/update/npm/@astrojs/cloudflare-13.6.0 branch from 5ccce61 to 03bd608 Compare June 9, 2026 11:55
@depfu

depfu Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Closed in favor of #456.

@depfu depfu Bot closed this Jun 25, 2026
@depfu
depfu Bot deleted the depfu/update/npm/@astrojs/cloudflare-13.6.0 branch June 25, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants