🇰🇷 한글 설명
Node.js의 fetch() 함수가 Brotli 압축 콘텐츠를 자동 디코딩하면서 발생하는 취약점으로, 공격자가 악의적인 URL을 통해 대량의 압축 데이터를 전송하여 메모리 고갈을 유발할 수 있습니다. 이로 인해 Node.js 프로세스가 종료될 수 있으며, 시스템 설정에 따라 더 심각한 영향이 발생할 수 있습니다.
💡 쉬운 설명
Node.js에서 웹사이트에서 파일을 내려받을 때 압축을 풀면서 메모리를 과도하게 사용하는 문제입니다. 악의적인 사람이 매우 압축된 거대한 파일을 보내면 프로그램이 멈춰버릴 수 있습니다.
🇺🇸 원문 (English)
A vulnerability in Node.js has been identified, allowing for a Denial of Service (DoS) attack through resource exhaustion when using the fetch() function to retrieve content from an untrusted URL.
The vulnerability stems from the fact that the fetch() function in Node.js always decodes Brotli, making it possible for an attacker to cause resource exhaustion when fetching content from an untrusted URL.
An attacker controlling the URL passed into fetch() can exploit this vulnerability to exhaust memory, potentially leading to process termination, depending on the system configuration.
📍 영향받는 시스템
Node.js 18.x, 20.x, 21.x 및 이전 버전에서 fetch() 함수를 사용하는 모든 애플리케이션
⚔️ 공격 벡터
공격자가 Brotli 압축된 악의적 콘텐츠가 포함된 URL을 fetch() 함수에 전달하여 메모리 고갈 공격을 수행합니다.
🛡️ 대응 방법
Node.js를 최신 패치된 버전으로 업데이트하고, 신뢰할 수 없는 URL 처리 시 타임아웃 및 메모리 제한을 설정합니다.
🔧 검증 코드
명령어가 'potentially_vulnerable'을 반환하면 영향받는 버전입니다. 해당 버전의 최신 패치 버전으로 업데이트 필요합니다.
node -p "process.version" | grep -E '^v(18|19|20|21)' && echo 'potentially_vulnerable' || echo 'check_patch_status'