{"id":"CVE-2026-3125","state":"PUBLISHED","title":"SSRF vulnerability in opennextjs-cloudflare via /cdn-cgi/ path normalization bypass","description":"A Server-Side Request Forgery (SSRF) vulnerability was identified in the @opennextjs/cloudflare package, resulting from a path normalization bypass in the /cdn-cgi/image/ handler.The @opennextjs/cloudflare worker template includes a /cdn-cgi/image/ handler intended for development use only. In production, Cloudflare's edge intercepts /cdn-cgi/image/ requests before they reach the Worker. However, by substituting a backslash for a forward slash (/cdn-cgi\\image/ instead of /cdn-cgi/image/), an attacker can bypass edge interception and have the request reach the Worker directly. The JavaScript URL class then normalizes the backslash to a forward slash, causing the request to match the handler and trigger an unvalidated fetch of arbitrary remote URLs.\n\nFor example: \n\n https://victim-site.com/cdn-cgi\\image/aaaa/https://attacker.com \n\nIn this example, attacker-controlled content from attacker.com is served through the victim site's domain (victim-site.com), violating the same-origin policy and potentially misleading users or other services.\n\nNote: This bypass only works via HTTP clients that preserve backslashes in paths (e.g., curl --path-as-is). Browsers normalize backslashes to forward slashes before sending requests.\n\nAdditionally, Cloudflare Workers with Assets and Cloudflare Pages suffer from a similar vulnerability. Assets stored under /cdn-cgi/ paths are not publicly accessible under normal conditions. However, using the same backslash bypass (/cdn-cgi\\... instead of /cdn-cgi/...), these assets become publicly accessible. This could be used to retrieve private data. For example, Open Next projects store incremental cache data under /cdn-cgi/_next_cache, which could be exposed via this bypass.","publishedAt":"2026-03-04T18:14:31.111Z","updatedAt":"2026-03-04T18:58:56.614Z","severity":{"score":7.7,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:H/SI:N/SA:N","source":"cloudflare"},"assigner":"cloudflare","products":["opennextjs @opennextjs/cloudflare"],"affected":[{"vendor":"opennextjs","product":"@opennextjs/cloudflare","packageName":"@opennextjs/cloudflare","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.17.1","versionType":"npm"}],"collectionURL":"https://www.npmjs.com/package/@opennextjs/cloudflare","modules":["packages/cloudflare/src/cli/templates/worker.ts"],"platforms":["Cloudflare Workers"],"repo":"https://github.com/opennextjs/opennextjs-cloudflare"}],"references":["https://github.com/opennextjs/opennextjs-cloudflare/pull/1147","https://www.npmjs.com/package/@opennextjs/cloudflare/v/1.17.1","https://github.com/advisories/GHSA-rvpw-p7vw-wj3m","https://www.cve.org/cverecord?id=CVE-2025-6087"],"weaknesses":["CWE-918","CWE-706"],"ingestedAt":"2026-10-29T20:11:50.837Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/3xxx/CVE-2026-3125.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-3125","state":"PUBLISHED","datePublished":"2026-03-04T18:14:31.111Z","dateUpdated":"2026-03-04T18:58:56.614Z","assignerShortName":"cloudflare","assignerOrgId":"a22f1246-ba21-4bb4-a601-ad51614c1513","dateReserved":"2026-02-24T14:15:54.385Z"},"containers":{"cna":{"title":"SSRF vulnerability in opennextjs-cloudflare via /cdn-cgi/ path normalization bypass","descriptions":[{"lang":"en","value":"A Server-Side Request Forgery (SSRF) vulnerability was identified in the @opennextjs/cloudflare package, resulting from a path normalization bypass in the /cdn-cgi/image/ handler.The @opennextjs/cloudflare worker template includes a /cdn-cgi/image/ handler intended for development use only. In production, Cloudflare's edge intercepts /cdn-cgi/image/ requests before they reach the Worker. However, by substituting a backslash for a forward slash (/cdn-cgi\\image/ instead of /cdn-cgi/image/), an attacker can bypass edge interception and have the request reach the Worker directly. The JavaScript URL class then normalizes the backslash to a forward slash, causing the request to match the handler and trigger an unvalidated fetch of arbitrary remote URLs.\n\nFor example: \n\n https://victim-site.com/cdn-cgi\\image/aaaa/https://attacker.com \n\nIn this example, attacker-controlled content from attacker.com is served through the victim site's domain (victim-site.com), violating the same-origin policy and potentially misleading users or other services.\n\nNote: This bypass only works via HTTP clients that preserve backslashes in paths (e.g., curl --path-as-is). Browsers normalize backslashes to forward slashes before sending requests.\n\nAdditionally, Cloudflare Workers with Assets and Cloudflare Pages suffer from a similar vulnerability. Assets stored under /cdn-cgi/ paths are not publicly accessible under normal conditions. However, using the same backslash bypass (/cdn-cgi\\... instead of /cdn-cgi/...), these assets become publicly accessible. This could be used to retrieve private data. For example, Open Next projects store incremental cache data under /cdn-cgi/_next_cache, which could be exposed via this bypass."}],"affected":[{"vendor":"opennextjs","product":"@opennextjs/cloudflare","packageName":"@opennextjs/cloudflare","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.17.1","versionType":"npm"}],"collectionURL":"https://www.npmjs.com/package/@opennextjs/cloudflare","modules":["packages/cloudflare/src/cli/templates/worker.ts"],"platforms":["Cloudflare Workers"],"repo":"https://github.com/opennextjs/opennextjs-cloudflare"}],"references":[{"url":"https://github.com/opennextjs/opennextjs-cloudflare/pull/1147","tags":["patch"]},{"url":"https://www.npmjs.com/package/@opennextjs/cloudflare/v/1.17.1","tags":["product"]},{"url":"https://github.com/advisories/GHSA-rvpw-p7vw-wj3m","tags":["related"]},{"url":"https://www.cve.org/cverecord?id=CVE-2025-6087","tags":["related"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":7.7,"baseSeverity":"HIGH","exploitMaturity":"NOT_DEFINED","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"HIGH","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:H/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-918","description":"CWE-918 Server-Side Request Forgery (SSRF)","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-706","description":"CWE-706 Use of Incorrectly-Resolved Name or Reference","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"cloudflare","orgId":"a22f1246-ba21-4bb4-a601-ad51614c1513","dateUpdated":"2026-03-04T18:14:31.111Z"},"credits":[{"lang":"en","type":"finder","value":"https://x.com/ez_z3r"}],"impacts":[{"capecId":"CAPEC-664","descriptions":[{"lang":"en","value":"CAPEC-664 Server Side Request Forgery"}]},{"capecId":"CAPEC-267","descriptions":[{"lang":"en","value":"CAPEC-267 Leverage Alternate Encoding"}]}],"solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><span style=\"background-color: transparent;\">Server-side updates to Cloudflare's Workers platform to block backslash path normalization bypasses for /cdn-cgi requests. The update automatically mitigates the issue for all existing and any future sites deployed to Cloudflare Workers.</span></p><br><br>"}],"value":"Server-side updates to Cloudflare's Workers platform to block backslash path normalization bypasses for /cdn-cgi requests. The update automatically mitigates the issue for all existing and any future sites deployed to Cloudflare Workers."},{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><span style=\"background-color: transparent;\">In addition to the platform level fix, </span><a target=\"_blank\" rel=\"nofollow\" href=\"https://github.com/opennextjs/opennextjs-cloudflare/pull/1147\"><span style=\"background-color: transparent;\">root cause fix</span></a><span style=\"background-color: transparent;\"> has been implemented to the Cloudflare adapter for Open Next. The patched version of the adapter is found at @opennextjs/cloudflare@1.17.1 (</span><a target=\"_blank\" rel=\"nofollow\" href=\"https://www.npmjs.com/package/@opennextjs/cloudflare\"><span style=\"background-color: transparent;\">https://www.npmjs.com/package/@opennextjs/cloudflare</span></a><span style=\"background-color: transparent;\">)</span></p><br><br>"}],"value":"In addition to the platform level fix,  root cause fix https://github.com/opennextjs/opennextjs-cloudflare/pull/1147  has been implemented to the Cloudflare adapter for Open Next. The patched version of the adapter is found at @opennextjs/cloudflare@1.17.1 ( https://www.npmjs.com/package/@opennextjs/cloudflare https://www.npmjs.com/package/@opennextjs/cloudflare )"},{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<a target=\"_blank\" rel=\"nofollow\" href=\"https://github.com/opennextjs/opennextjs-cloudflare/pull/1150\"><span style=\"background-color: transparent;\">Dependency update</span></a><span style=\"background-color: transparent;\"> to the Next.js template used with create-cloudflare (c3) to use the fixed version of the Cloudflare adapter for Open Next.</span><br>"}],"value":"Dependency update https://github.com/opennextjs/opennextjs-cloudflare/pull/1150  to the Next.js template used with create-cloudflare (c3) to use the fixed version of the Cloudflare adapter for Open Next."}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.5.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-04T18:58:41.207814Z","id":"CVE-2026-3125","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-04T18:58:56.614Z"}}]}}}