🔍 CVE-2026-31808

5.3
CVSS Score
MEDIUM
2026-03-10
2026-06-17 10:34
✅ 완료

🇰🇷 한글 설명

file-type 라이브러리의 ASF(WMV/WMA) 파일 형식 감지 파서에서 서비스 거부(DoS) 취약점이 발견되었습니다. 공격자가 조작된 ASF 서브 헤더를 포함한 파일을 제공하면 파서가 무한 루프에 빠져 Node.js 이벤트 루프를 중단시킬 수 있습니다.

💡 쉬운 설명

특수하게 만들어진 파일을 업로드하면 프로그램이 끝없이 계산을 반복하느라 멈춰버리는 문제입니다. 아주 작은 크기의 파일만으로도 서버를 마비시킬 수 있습니다.

🇺🇸 원문 (English)

file-type detects the file type of a file, stream, or data. Prior to 21.3.1, a denial of service vulnerability exists in the ASF (WMV/WMA) file type detection parser. When parsing a crafted input where an ASF sub-header has a size field of zero, the parser enters an infinite loop. The payload value becomes negative (-24), causing tokenizer.ignore(payload) to move the read position backwards, so the same sub-header is read repeatedly forever. Any application that uses file-type to detect the type of untrusted/attacker-controlled input is affected. An attacker can stall the Node.js event loop with a 55-byte payload. Fixed in version 21.3.1.

📍 영향받는 시스템

file-type 라이브러리 21.3.1 미만 버전

⚔️ 공격 벡터

조작된 ASF 서브 헤더(크기 필드 0)를 포함한 55바이트 크기의 페이로드를 전송

🛡️ 대응 방법

file-type 라이브러리를 21.3.1 버전 이상으로 업데이트

🔧 검증 코드

출력된 결과에서 file-type의 버전이 21.3.1 미만인지 확인

Shell / Script
npm list file-type

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Node.js