🔍 CVE-2025-6087

9.1
CVSS Score
CRITICAL
2025-06-16
2026-06-17 10:01
✅ 완료

🇰🇷 한글 설명

@opennextjs/cloudflare 패키지의 Cloudflare 어댑터에서 구현되지 않은 기능으로 인해 서버 측 요청 위조(SSRF) 취약점이 발견되었습니다. 공격자는 /_next/image 엔드포인트를 통해 임의의 원격 콘텐츠를 피해자 사이트의 도메인을 통해 로드할 수 있습니다. 이는 동일 출처 정책(SOP)을 위반하며 피싱이나 내부 서비스 노출 위험을 초래할 수 있습니다.

💡 쉬운 설명

웹사이트가 외부의 악성 사이트 내용을 마치 자기 자신의 내용인 것처럼 속여서 보여줄 수 있는 보안 약점입니다. 이를 통해 사용자를 속이는 피싱 공격이나 내부 네트워크 침투가 가능해질 수 있습니다.

🇺🇸 원문 (English)

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. 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.

📍 영향받는 시스템

@opennextjs/cloudflare (v1.3.0 미만 버전)

⚔️ 공격 벡터

/_next/image?url=https://attacker.com 형태의 URL 파라미터를 조작하여 임의의 외부 리소스를 요청

🛡️ 대응 방법

@opennextjs/cloudflare를 v1.3.0 이상으로 업데이트하고 Next.js의 remotePatterns 설정을 사용하여 허용된 URL만 사용하도록 제한

🔧 검증 코드

출력된 버전이 1.3.0 미만이면 취약한 상태이며, 1.3.0 이상이면 패치된 상태입니다.

Shell / Script
npm list @opennextjs/cloudflare

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

💻 영향받는 소프트웨어

Cloud Services