🔍 CVE-2025-59472

5.9
CVSS Score
MEDIUM
2026-01-26
2026-06-17 09:46
✅ 완료

🇰🇷 한글 설명

Next.js에서 부분 事前 렌더링(Partial Prerendering, PPR)이 활성화된 경우 서비스 거부 취약점이 존재한다. 이는 PPR resume 엔드포인트에서 인증되지 않은 POST 요청을 처리할 때 발생하며, 공격자가 서버 프로세스를 메모리 고갈로 충돌시킬 수 있다.

💡 쉬운 설명

Next.js에서 부분 事前 렌더링이 활성화된 경우, 공격자가 서버를 메모리 고갈로 충돌시킬 수 있는 취약점이 있습니다. 이는 공격자가 큰 요청을 보내거나 압축된 데이터를 보내서 서버의 메모리를 모두 사용할 수 있습니다.

🇺🇸 원문 (English)

A denial of service vulnerability exists in Next.js versions with Partial Prerendering (PPR) enabled when running in minimal mode. The PPR resume endpoint accepts unauthenticated POST requests with the `Next-Resume: 1` header and processes attacker-controlled postponed state data. Two closely related vulnerabilities allow an attacker to crash the server process through memory exhaustion: 1. **Unbounded request body buffering**: The server buffers the entire POST request body into memory using `Buffer.concat()` without enforcing any size limit, allowing arbitrarily large payloads to exhaust available memory. 2. **Unbounded decompression (zipbomb)**: The resume data cache is decompressed using `inflateSync()` without limiting the decompressed output size. A small compressed payload can expand to hundreds of megabytes or gigabytes, causing memory exhaustion. Both attack vectors result in a fatal V8 out-of-memory error (`FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory`) causing the Node.js process to terminate. The zipbomb variant is particularly dangerous as it can bypass reverse proxy request size limits while still causing large memory allocation on the server. To be affected you must have an application running with `experimental.ppr: true` or `cacheComponents: true` configured along with the NEXT_PRIVATE_MINIMAL_MODE=1 environment variable. Strongly consider upgrading to 15.6.0-canary.61 or 16.1.5 to reduce risk and prevent availability issues in Next applications.

📍 영향받는 시스템

Next.js 버전 15.6.0-canary.61 및 16.1.5 이전 버전에서 experimental.ppr 또는 cacheComponents가 true로 설정되고 NEXT_PRIVATE_MINIMAL_MODE=1 환경 변수가 설정된 경우

⚔️ 공격 벡터

인증되지 않은 POST 요청을 PPR resume 엔드포인트에 보내서 서버의 메모리를 고갈시키거나, 압축된 데이터를 보내서 서버의 메모리를 고갈시키는 것

🛡️ 대응 방법

Next.js를 15.6.0-canary.61 또는 16.1.5 버전으로 업그레이드하여 취약점을 해결할 수 있습니다.

🔧 검증 코드

로컬 시스템에서 npm을 사용하여 Next.js 버전을 확인합니다. 다음 명령어를 실행하여 결과를 확인하세요: python verification_code.py

Shell / Script
import subprocess
result = subprocess.run(['npm', 'ls', 'next'], capture_output=True, text=True)
if '15.6.0-canary.61' in result.stdout or '16.1.5' in result.stdout:
    print({"result": "양호", "reason": "Next.js 버전이 최신입니다."})
else:
    print({"result": "취약", "reason": "Next.js 버전이 구형입니다."})

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Node.js