🇰🇷 한글 설명
Nuxt Content 3.0.0부터 3.15.2 이전 버전에서 인증되지 않은 POST /__nuxt_content/:collection/query 엔드포인트가 공격자가 제어하는 sql 필드를 받아 비용이 큰 SQLite 식(randomblob, zeroblob, hex, length 등)을 허용합니다. 이로 인해 단일 요청만으로도 과도한 CPU·메모리를 소비하고 Node.js 이벤트 루프를 차단하여 서비스 전체가 응답 불능 상태에 빠질 수 있습니다. 정적 프리렌더링만 사용하고 서버 엔드포인트를 노출하지 않는 배포는 영향을 받지 않으며, 3.15.2에서 수정되었습니다.
💡 쉬운 설명
웹사이트의 데이터 조회 기능에 특정 계산 명령을 보내면 서버가 과도하게 일해서 멈춰버릴 수 있는 문제입니다. 한 번의 요청으로도 전체 사이트가 느려지거나 응답하지 않을 수 있습니다.
🇺🇸 원문 (English)
Nuxt Content is the file-based CMS for Nuxt applications, powered by Markdown and Vue components. From 3.0.0 until 3.15.2, the unauthenticated POST /__nuxt_content/:collection/query endpoint accepts an attacker-controlled sql field in src/runtime/api/query.post.ts and permits expensive SQLite expressions. Version 3.0.0 performed no query validation; in affected releases using assertSafeQuery in src/runtime/internal/security.ts, the reported validation gap rejects a short list of SQL command keywords in WHERE clauses but permits function calls including randomblob(), zeroblob(), hex(), and length(). The query reaches the synchronous better-sqlite3 sink in src/runtime/internal/database.server.ts, allowing a single remote request to consume substantial CPU and memory while blocking the Node.js event loop and all concurrent request handling. Fully static prerendered deployments that do not expose the server endpoint are not affected. This issue is fixed in version 3.15.2.
📍 영향받는 시스템
Nuxt Content 3.0.0 이상 3.15.2 미만을 서버 모드로 사용하는 Nuxt 애플리케이션
⚔️ 공격 벡터
인증 없이 /__nuxt_content/:collection/query 엔드포인트에 비용이 큰 SQLite 함수가 포함된 sql 요청을 보내 서버의 CPU·메모리를 고갈시키고 이벤트 루프를 차단
🛡️ 대응 방법
nuxt/content 패키지를 3.15.2 이상으로 업그레이드하고, 서버 엔드포인트가 불필요하면 정적 프리렌더링 방식으로 전환
🔧 검증 코드
출력된 @nuxt/content 버전이 3.15.2 미만(3.0.0~3.15.1)이고 서버 모드로 배포되어 있다면 취약하며, 3.15.2 이상이거나 패키지가 없으면 영향받지 않습니다.
cat package.json 2>/dev/null | grep -E '"@nuxt/content"|"nuxt\s*content"'; npm ls @nuxt/content 2>/dev/null