🇰🇷 한글 설명
Node.js용 HTTP 클라이언트 라이브러리인 undici의 특정 버전에서 zlib 압축 해제 콜백 중 발생하는 예외를 제대로 처리하지 못하는 취약점이 발견되었습니다. 공격자가 조작된 압축 데이터를 전송할 경우, 압축 해제 과정에서 예외가 발생하여 Node.js 프로세스가 예기치 않게 종료될 수 있습니다.
💡 쉬운 설명
특정 라이브러리를 사용하는 프로그램이 압축된 데이터를 처리할 때, 공격자가 보낸 특수한 데이터를 받으면 프로그램이 갑자기 꺼져버리는 문제입니다. 이는 서비스 중단(DoS)을 일으킬 수 있는 보안 약점입니다.
🇺🇸 원문 (English)
undici is an HTTP client library for Node.js. In versions 7.15.0 through 7.30.0 and 8.0.0 through 8.12.1, its decompress interceptor forwards decompressed response data to the downstream handler from zlib stream event callbacks without catching exceptions those callbacks may throw, and while undici's engine converts a synchronous throw from a downstream handler into a per-request failure, that protection is absent when the throw happens asynchronously from a zlib callback. As a result, a downstream handler that throws by design, such as the built-in dump interceptor which throws when a response exceeds its configured maximum size, escapes as an uncaught exception that terminates the Node.js process. A malicious or compromised HTTP server can crash any client that composes the decompress interceptor with such a handler by returning a small compressed body that decompresses to more than the configured limit, so only the decompressed size matters and the bytes on the wire stay tiny. The issue is fixed in undici 7.30.1 and 8.12.2, and users should upgrade to one of those versions or later. As a workaround, avoid composing the decompress interceptor with a response handler that throws during response processing until upgrading.
📍 영향받는 시스템
undici versions 7.15.0-7.30.0 and 8.0.0-8.12.1
⚔️ 공격 벡터
악의적인 HTTP 서버가 설정된 제한 크기를 초과하여 압축 해제되는 작은 크기의 조작된 응답 데이터를 전송함
🛡️ 대응 방법
undici 버전을 7.30.1 또는 8.12.2 이상으로 업그레이드하십시오.
🔧 검증 코드
출력된 undici의 버전이 취약한 범위(7.15.0~7.30.0 또는 8.0.0~8.12.1)에 해당하는지 확인하십시오.
npm list undici | grep undici