CVE-2025-6087: OpenNext for Cloudflare (opennextjs-cloudflare) has a SSRF vulnerability via /_next/image endpoint
A 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.
References
- github.com/advisories/GHSA-rvpw-p7vw-wj3m
- github.com/cloudflare/workers-sdk/pull/9608
- github.com/opennextjs/opennextjs-cloudflare
- github.com/opennextjs/opennextjs-cloudflare/commit/36119c0f490c95b3d4f6e826d745b728c80625ab
- github.com/opennextjs/opennextjs-cloudflare/pull/727
- github.com/opennextjs/opennextjs-cloudflare/security/advisories/GHSA-rvpw-p7vw-wj3m
- nvd.nist.gov/vuln/detail/CVE-2025-6087
Code Behaviors & Features
Detect and mitigate CVE-2025-6087 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →