🇰🇷 한글 설명
jq는 명령줄 JSON 프로세서로, 특정 커밋 이전 버전에서 하드코딩된 시드를 사용하는 MurmurHash3 알고리즘을 사용했습니다. 공격자가 미리 계산된 키 충돌을 포함한 특수 JSON 객체를 제공하면 해시 테이블 탐색 성능이 급격히 저하되어 CPU 자원을 고갈시키는 서비스 거부(DoS) 공격이 가능합니다.
💡 쉬운 설명
데이터를 빠르게 정리해주는 프로그램이 특정 규칙을 가진 데이터를 받으면 갑자기 엄청나게 느려지는 문제입니다. 공격자가 일부러 복잡한 데이터를 보내 컴퓨터의 계산 능력을 마비시킬 수 있습니다.
🇺🇸 원문 (English)
jq is a command-line JSON processor. Before commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784, jq used MurmurHash3 with a hardcoded, publicly visible seed (0x432A9843) for all JSON object hash table operations, which allowed an attacker to precompute key collisions offline. By supplying a crafted JSON object (~100 KB) where all keys hashed to the same bucket, hash table lookups degraded from O(1) to O(n), turning any jq expression into an O(n²) operation and causing significant CPU exhaustion. This affected common jq use cases such as CI/CD pipelines, web services, and data processing scripts, and was far more practical to exploit than existing heap overflow issues since it required only a small payload. This issue has been patched in commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784.
📍 영향받는 시스템
jq (commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784 이전 버전)
⚔️ 공격 벡터
해시 충돌을 유도하도록 설계된 약 100KB 크기의 특수 JSON 객체 전송
🛡️ 대응 방법
패치가 적용된 최신 버전의 jq로 업데이트 (commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784 이상)
🔧 검증 코드
출력된 버전이 패치가 적용된 커밋 이후의 버전인지 확인합니다.