🔍 CVE-2026-120215

3.7
CVSS Score
LOW
2026-11-02
2026-11-02 17:17
✅ 완료

🇰🇷 한글 설명

@fastify/cors 플러그인에서 onSend 훅 옵션을 비기본값으로 사용하는 경우, CORS preflight(OPTIONS) 요청 한 번으로 응답 헤더가 두 번 전송되며 처리되지 않은 ERR_HTTP_HEADERS_SENT 예외가 발생해 Node.js 프로세스가 종료될 수 있습니다. 인증 없이 원격에서 유발 가능하며 영향은 가용성(DoS)에 한정됩니다. 11.4.0 이상으로 업그레이드하면 해결됩니다.

💡 쉬운 설명

특정 설정으로 CORS 플러그인을 사용하는 웹 서버에 아주 간단한 요청 하나를 보내면 서버 프로그램이 멈출 수 있습니다. 공격자가 인증 없이 서버를 일시적으로 중단시킬 수 있는 문제입니다.

🇺🇸 원문 (English)

@fastify/cors is the CORS plugin for the Fastify web framework. In versions 8.2.0 through 11.3.x, an application that registers the plugin with the non-default onSend hook option crashes on a CORS preflight. On an OPTIONS request that carries the Origin and Access-Control-Request-Method headers, the plugin calls reply.send from inside the onSend hook and re-enters the send pipeline, so a second write of the response headers throws an uncaught ERR_HTTP_HEADERS_SENT that can terminate the Node.js process when no process-level handler is installed. An unauthenticated remote client can trigger this with a single preflight request, so the impact is availability only, and exploitation requires the non-default onSend configuration. The issue is fixed in @fastify/cors 11.4.0, where onSend is no longer an accepted hook value and registration fails with a clear error instead of crashing at request time, and users should upgrade to 11.4.0 or later. As a workaround, use any other hook such as the default onRequest, or set preflight to false.

📍 영향받는 시스템

@fastify/cors 8.2.0 ~ 11.3.x 중 onSend 훅 옵션을 사용하는 Fastify 애플리케이션

⚔️ 공격 벡터

인증 없이 Origin 및 Access-Control-Request-Method 헤더를 포함한 OPTIONS 요청 1회 전송으로 프로세스 크래시 유발 (가용성 영향)

🛡️ 대응 방법

@fastify/cors를 11.4.0 이상으로 업그레이드하거나, onSend 대신 onRequest 등 다른 훅을 사용하거나 preflight를 false로 설정

🔧 검증 코드

출력된 버전이 8.2.0~11.3.x 범위이고 onSend 훅 옵션을 사용 중이면 취약하며, 11.4.0 이상이면 조치 완료입니다.

Shell / Script
npm ls @fastify/cors 2>/dev/null | grep '@fastify/cors'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Node.js