CVE-2025-6087: @opennextjs/cloudflare OpenNext For Cloudflare (opennextjs-cloudflare) Has Vulnerability
HIGHCVE-2025-6087 is a HIGH opennext for cloudflare (opennextjs-cloudflare) has vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting @opennextjs/cloudflare libraries in the npm ecosystem. The issue involves opennext for cloudflare (opennextjs-cloudflare) has a ssrf vulnerability via /_next/image endpoint. Remediation is available by upgrading affected packages to version 1.3.0.
CVE-2025-6087 at a Glance
How to Fix CVE-2025-6087
To remediate this vulnerability, upgrade all affected @opennextjs/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.
npm install @opennextjs/cloudflare@1.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @opennextjs/cloudflare
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-6087, inspect your project dependencies using npm:
npm ls @opennextjs/cloudflare
Analyze the terminal output to locate any version of @opennextjs/cloudflare in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.0), your application is affected.
Note: The npm ls @opennextjs/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 @opennextjs/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
CVE-2025-6087 Affected @opennextjs/cloudflare Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@opennextjs/cloudflare
|
npm |
< 1.3.0
|
1.3.0
|
References
Frequently Asked Questions
What is CVE-2025-6087?
Which @opennextjs/cloudflare versions are affected?
What version fixes CVE-2025-6087?
Is @opennextjs/cloudflare affected?
What CWE is associated with CVE-2025-6087?
How can I check npm dependencies for CVE-2025-6087?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rvpw-p7vw-wj3m",
"modified" : "2025-06-16T21:46:51Z",
"published" : "2025-06-16T19:37:16Z",
"aliases" : [ "CVE-2025-6087" ],
"summary" : "OpenNext for Cloudflare (opennextjs-cloudflare) has a SSRF vulnerability via /_next/image endpoint",
"details" : "A Server-Side Request Forgery (SSRF) vulnerability was identified in the @opennextjs/cloudflare package. \n\nThe vulnerability stems from an unimplemented feature in the Cloudflare adapter for Open Next, which allowed unauthenticated users to proxy arbitrary remote content via the `/_next/image` endpoint. \n\nThis issue allowed attackers to load remote resources from arbitrary hosts under the victim site’s domain for any site deployed using the Cloudflare adapter for Open Next. For example: `https://victim-site.com/_next/image?url=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.\n\n### Impact\n\n- SSRF via unrestricted remote URL loading \n- Arbitrary remote content loading \n- Potential internal service exposure or phishing risks through domain abuse \n\n\n### Mitigation\n\nThe following mitigations have been put in place: \n\n**Server side updates** to Cloudflare’s platform to restrict the content loaded via the `/_next/image` endpoint to images. The update automatically mitigates the issue for all existing and any future sites deployed to Cloudflare using the affected version of the Cloudflare adapter for Open Next \n\n**Root cause fix**: Pull request https://github.com/opennextjs/opennextjs-cloudflare/pull/727 to the Cloudflare adapter for Open Next. The patched version of the adapter is found here [@opennextjs/cloudflare@1.3.0](https://www.npmjs.com/package/@opennextjs/cloudflare/v/1.3.0)\n\n**Package dependency update**: Pull request https://github.com/cloudflare/workers-sdk/pull/9608 to create-cloudflare (c3) to use the fixed version of the Cloudflare adapter for Open Next. The patched version of create-cloudflare is found at [create-cloudflare@2.49.3](https://www.npmjs.com/package/create-cloudflare/v/2.49.3).\n\n In addition to the automatic mitigation deployed on Cloudflare’s platform, we encourage affected users to upgrade to @opennext/cloudflare v1.3.0 and use the [remotePatterns](https://nextjs.org/docs/pages/api-reference/components/image#remotepatterns) filter in Next config if they need to allow-list external urls with images assets.\n\n### Credits\n\nDisclosed responsibly by security researcher Edward Coristine. Thank you for the report.\n\n### References\n\nhttps://www.cve.org/cverecord?id=CVE-2025-6087",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:H/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@opennextjs/cloudflare"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/opennextjs/opennextjs-cloudflare/security/advisories/GHSA-rvpw-p7vw-wj3m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-6087"
}, {
"type" : "WEB",
"url" : "https://github.com/cloudflare/workers-sdk/pull/9608"
}, {
"type" : "WEB",
"url" : "https://github.com/opennextjs/opennextjs-cloudflare/pull/727"
}, {
"type" : "WEB",
"url" : "https://github.com/opennextjs/opennextjs-cloudflare/commit/36119c0f490c95b3d4f6e826d745b728c80625ab"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/opennextjs/opennextjs-cloudflare"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-16T19:37:16Z",
"nvd_published_at" : "2025-06-16T19:15:33Z"
}
}