CVE-2026-41321: @astrojs/cloudflare Cloudflare Has SSRF Vulnerability

LOW
Advisory Identifier: GHSA-88gm-j2wx-58h6
CVSS 2.2
CWE-918
Published
Advisory Summary

CVE-2026-41321 is a LOW (CVSS 2.2) cloudflare has ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting @astrojs/cloudflare libraries in the npm ecosystem. The issue involves cloudflare has ssrf via redirect following through its image-binding-transform endpoint (incomplete fix for ghsa-qpr4). Remediation is available by upgrading affected packages to version 13.1.10.

CVE-2026-41321 at a Glance

CVE Identifier CVE-2026-41321
GHSA Identifier GHSA-88gm-j2wx-58h6
Severity LOW
CVSS v3.1 Base Score 2.2
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product @astrojs/cloudflare
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 2.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-41321

To remediate this vulnerability, upgrade all affected @astrojs/cloudflare dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@astrojs/cloudflare fixed: 13.1.10
npm install @astrojs/cloudflare@13.1.10
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @astrojs/cloudflare

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-41321, inspect your project dependencies using npm:

npm ls @astrojs/cloudflare

Analyze the terminal output to locate any version of @astrojs/cloudflare in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 13.1.10), your application is affected.

Note: The npm ls @astrojs/cloudflare command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In @astrojs/cloudflare, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-41321 Affected @astrojs/cloudflare Versions

1 component(s)
Fixed Versions:
13.1.10
Product / Package Ecosystem Affected Versions Fixed Version
@astrojs/cloudflare
npm
< 13.1.10
13.1.10

References

Frequently Asked Questions

What is CVE-2026-41321?
CVE-2026-41321 is a security vulnerability in @astrojs/cloudflare involving Cloudflare has SSRF via redirect following through its image-binding-transform endpoint (incomplete fix for GHSA-qpr4) under CWE-918: Server-Side Request Forgery (SSRF).
Which @astrojs/cloudflare versions are affected?
Affected versions include releases prior to 13.1.10 across affected packages: @astrojs/cloudflare.
What version fixes CVE-2026-41321?
Upgrading to 13.1.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @astrojs/cloudflare affected?
Yes, @astrojs/cloudflare is affected in releases prior to 13.1.10. Upgrade your dependency to 13.1.10 or later.
What is the CVSS score of CVE-2026-41321?
CVE-2026-41321 has a CVSS v3.1 base score of 2.2 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-41321?
CVE-2026-41321 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2026-41321?
Run the dependency tree command: 'npm ls @astrojs/cloudflare'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-88gm-j2wx-58h6",
  "modified" : "2026-04-27T16:42:19Z",
  "published" : "2026-04-23T21:52:03Z",
  "aliases" : [ "CVE-2026-41321" ],
  "summary" : "Cloudflare has SSRF via redirect following through its image-binding-transform endpoint (incomplete fix for GHSA-qpr4)",
  "details" : "## 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));",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@astrojs/cloudflare"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "13.1.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/withastro/astro/security/advisories/GHSA-88gm-j2wx-58h6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41321"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/withastro/astro/commit/a43eb4b40b4f81530e3c9b5e2959495900320433"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-qpr4-c339-7vq8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/withastro/astro"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/withastro/astro/releases/tag/%40astrojs%2Fcloudflare%4013.1.10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-23T21:52:03Z",
    "nvd_published_at" : "2026-04-24T18:16:28Z"
  }
}