🔍 CVE-2021-32765

8.8
CVSS Score
HIGH
2021-10-04
2026-06-17 03:53
✅ 완료

🇰🇷 한글 설명

Redis 클라이언트 라이브러리인 Hiredis에서 발생하는 정수 오버플로 취약점입니다. 악의적으로 조작된 RESP multi-bulk 프로토콜 데이터를 처리할 때 배열 크기 계산 오류로 인해 버퍼 오버플로가 발생할 수 있습니다.

💡 쉬운 설명

데이터를 읽어올 때 숫자가 너무 커져서 컴퓨터가 계산 실수를 일으키는 문제입니다. 이 실수 때문에 메모리 공간이 부족하게 할당되어 시스템이 해킹될 위험이 있습니다.

🇺🇸 원문 (English)

Hiredis is a minimalistic C client library for the Redis database. In affected versions Hiredis is vulnurable to integer overflow if provided maliciously crafted or corrupted `RESP` `mult-bulk` protocol data. When parsing `multi-bulk` (array-like) replies, hiredis fails to check if `count * sizeof(redisReply*)` can be represented in `SIZE_MAX`. If it can not, and the `calloc()` call doesn't itself make this check, it would result in a short allocation and subsequent buffer overflow. Users of hiredis who are unable to update may set the [maxelements](https://github.com/redis/hiredis#reader-max-array-elements) context option to a value small enough that no overflow is possible.

📍 영향받는 시스템

Hiredis 라이브러리 (취약한 버전)

⚔️ 공격 벡터

조작된 RESP multi-bulk 프로토콜 데이터를 전송하여 정수 오버플로 유도

🛡️ 대응 방법

Hiredis를 최신 버전으로 업데이트하거나, context 옵션의 maxelements 값을 작게 설정하여 제한함

🔧 검증 코드

출력된 버전이 취약한 버전인지 확인하거나 설치 여부를 체크합니다.

Shell / Script
pkg-config --modversion hiredis 2>/dev/null || echo 'Not installed'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Redis