🇰🇷 한글 설명
Redis에서 특수하게 제작된 Lua 스크립트를 실행할 경우 힙 기반의 Lua 스택 오버플로가 발생할 수 있습니다. 이로 인해 힙 메모리 손상이 발생하며, 공격자가 원격에서 코드를 실행할 가능성이 있습니다. 이 취약점은 Lua 스크립팅을 지원하는 Redis 2.6 버전부터 존재합니다.
💡 쉬운 설명
Redis 데이터베이스에서 특정 명령어를 잘못 사용하면 메모리 공간이 넘쳐흐르는 문제가 발생합니다. 이를 통해 해커가 서버를 원격으로 조종할 수 있는 위험이 있습니다.
🇺🇸 원문 (English)
Redis is an open source, in-memory database that persists on disk. In affected versions specially crafted Lua scripts executing in Redis can cause the heap-based Lua stack to be overflowed, due to incomplete checks for this condition. This can result with heap corruption and potentially remote code execution. This problem exists in all versions of Redis with Lua scripting support, starting from 2.6. The problem is fixed in versions 6.2.6, 6.0.16 and 5.0.14. For users unable to update an additional workaround to mitigate the problem without patching the redis-server executable is to prevent users from executing Lua scripts. This can be done using ACL to restrict EVAL and EVALSHA commands.
📍 영향받는 시스템
Redis 2.6 이상 버전 중 6.2.6, 6.0.16, 5.0.14 미만 버전
⚔️ 공격 벡터
특수하게 조작된 Lua 스크립트를 통한 원격 명령 실행
🛡️ 대응 방법
Redis를 최신 보안 패치 버전(6.2.6, 6.0.16, 5.0.14 이상)으로 업데이트하거나, ACL을 통해 EVAL 및 EVALSHA 명령 실행을 제한합니다.
🔧 검증 코드
출력된 버전이 취약한 범위(2.6 ~ 6.2.5 등)에 해당하면 보안 업데이트가 필요합니다.
redis-server --version | grep -E 'v(2\.[0-9]|3\.|4\.|5\.[0-9]|6\.[0-1])'