🇰🇷 한글 설명
image-size 2.0.2 버전 이하에서는 ICNS 이미지 버퍼를 처리하는 과정에서 무한 루프에 빠지는 Denial of Service 취약점이 존재합니다. 공격자가 특수 제작된 ICNS 파일의 엔트리 길이를 0으로 설정하면 오프셋이 증가하지 않아 Node.js 이벤트 루프가 영구적으로 차단됩니다.
💡 쉬운 설명
이 취약점은 이미지 처리 라이브러리가 잘못된 파일을 처리할 때 프로그램이 멈추게 만드는 공격입니다. 공격자가 길이가 0인 이상한 이미지 파일을 보내면 시스템이 영원히 멈추어 정상적인 서비스 제공이 불가능해집니다.
🇺🇸 원문 (English)
image-size through 2.0.2 contains a denial of service vulnerability that allows remote attackers to permanently block the Node.js event loop by supplying a specially crafted ICNS image buffer. Attackers can craft an ICNS buffer containing valid magic bytes and a zero-valued entry length field to trigger an infinite loop in the ICNS parser, as the offset is never incremented when the entry length field is 0, causing the while loop condition to remain true indefinitely.
📍 영향받는 시스템
image-size <= 2.0.2
⚔️ 공격 벡터
특수 제작된 ICNS 이미지 버퍼를 전송하여 ICNS 파서에서 무한 루프 발생 유도
🛡️ 대응 방법
image-size 패키지를 최신 버전으로 업그레이드하거나, 신뢰할 수 없는 출처의 ICNS 파일 입력을 차단하십시오.
🔧 검증 코드
출력된 버전이 2.0.2 이하이거나 해당 패키지가 설치되어 있으면 영향을 받을 수 있습니다.
npm list image-size 2>/dev/null | grep -E 'image-size'