CVE-2025-6087
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedA Server-Side Request Forgery (SSRF) vulnerability was identified in the @opennextjs/cloudflare package. The 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. This 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. Impact: * SSRF via unrestricted remote URL loading * Arbitrary remote content loading * Potential internal service exposure or phishing risks through domain abuse Mitigation: The following mitigations have been put in place: * 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 * Root cause fix 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/[email protected] https://www.npmjs.com/package/@opennextjs/cloudflare/v/1.3.0 * Package dependency update 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 here: [email protected] https://www.npmjs.com/package/create-cloudflare/v/2.49.3 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 https://nextjs.org/docs/pages/api-reference/components/image#remotepatterns if they need to allow-list external urls with images assets.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA Server-Side Request Forgery (SSRF) vulnerability in the @opennextjs/cloudflare package allowed unauthenticated attackers to proxy arbitrary remote content through the /_next/image endpoint, enabling them to load external resources via the victim's domain and potentially access internal services or conduct phishing attacks.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 2.49.3< 1.3.0CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed @opennextjs/cloudflare versionRun 'npm list @opennextjs/cloudflare' or check package.json dependencies to see the installed versionAffected if Version is below 1.3.0
-
Identify installed create-cloudflare versionRun 'npm list create-cloudflare' or check package.json devDependencies to see the versionAffected if Version is below 2.49.3 (and the project uses this package)
-
Verify Next.js image configurationCheck next.config.js or next.config.mjs for remotePatterns setting under images configuration - look for a remotePatterns array with explicitly allowed external domainsAffected if remotePatterns is missing, empty, or not configured, meaning any external domain could be proxied through the /_next/image endpoint
-
Test /_next/image endpoint exposureMake a test request to http://your-domain/_next/image?url=https://evil.com/test.jpg (replacing your-domain with actual deployment URL)Affected if The request succeeds or returns an image response rather than being blocked, indicating the endpoint accepts arbitrary external URLs
You are affected if @opennextjs/cloudflare is below version 1.3.0 (or create-cloudflare below 2.49.3) AND remotePatterns is not configured in Next.js to restrict allowed image domains.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped1.3.02.49.3
Upgrade @opennextjs/cloudflare to version 1.3.0 (or later) and update create-cloudflare to 2.49.3, then configure remotePatterns in Next.js config to explicitly allow-list trusted external image domains.
@opennextjs/[email protected] or [email protected]
- Upgrade the @opennextjs/cloudflare package to version 1.3.0 or later by running: npm install @opennextjs/cloudflare@^1.3.0 or yarn add @opennextjs/cloudflare@^1.3.0
- Alternatively or additionally, upgrade create-cloudflare (c3) to version 2.49.3 or later which includes the fixed adapter
- Rebuild and redeploy your Cloudflare site to ensure the updated package is deployed
- If your application loads images from external domains, configure the remotePatterns option in your Next.js config to explicitly allow-list trusted domains (e.g., remotePatterns: [{ hostname: 'trusted-cdn.com' }])
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation1.0 h
- Implementation2.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,664.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-6087 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-6087 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data