CVE-2021-29478
📋 TL;DR
CVE-2021-29478 is an integer overflow vulnerability in Redis 6.2 that could allow attackers to corrupt heap memory and potentially achieve remote code execution. Only Redis versions 6.2.0 through 6.2.2 are affected. Redis 6.0 and earlier versions are not vulnerable to this specific issue.
💻 Affected Systems
- Redis
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Redis by Redislabs
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or ransomware deployment
Likely Case
Denial of service through Redis service crash or heap corruption
If Mitigated
Limited impact with proper ACL restrictions preventing configuration changes
🎯 Exploit Status
Exploitation requires ability to execute CONFIG SET command with specific parameters to trigger integer overflow
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 6.2.3
Vendor Advisory: https://github.com/redis/redis/security/advisories/GHSA-qh52-crrg-44g3
Restart Required: Yes
Instructions:
1. Download Redis 6.2.3 or later from redis.io or your package manager. 2. Stop Redis service. 3. Install new version. 4. Restart Redis service. 5. Verify version with 'redis-server --version'
🔧 Temporary Workarounds
ACL Restriction for CONFIG SET
allPrevent unprivileged users from modifying configuration via ACL rules
redis-cli ACL SETUSER <username> -@all +@read +@connection +@pubsub -CONFIG
🧯 If You Can't Patch
- Implement strict ACL rules to prevent users from using CONFIG SET command
- Restrict network access to Redis to only trusted sources using firewall rules
🔍 How to Verify
Check if Vulnerable:
Check Redis version with 'redis-server --version' or 'redis-cli INFO server | grep redis_version'
Check Version:
redis-server --version
Verify Fix Applied:
Confirm version is 6.2.3 or later using 'redis-server --version'
📡 Detection & Monitoring
Log Indicators:
- CONFIG SET commands with set-max-intset-entries parameter
- Redis crash logs or segmentation faults
Network Indicators:
- Unusual CONFIG SET commands from untrusted sources
SIEM Query:
source="redis" AND (command="CONFIG" AND args="set-max-intset-entries")
🔗 References
- https://github.com/redis/redis/security/advisories/GHSA-qh52-crrg-44g3
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BPWBIZXA67JFIB63W2CNVVILCGIC2ME5/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZJ6JGQ2ETZB2DWTQSGCOGG7EF3ILV4V/
- https://redis.io/
- https://security.gentoo.org/glsa/202107-20
- https://github.com/redis/redis/security/advisories/GHSA-qh52-crrg-44g3
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BPWBIZXA67JFIB63W2CNVVILCGIC2ME5/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZJ6JGQ2ETZB2DWTQSGCOGG7EF3ILV4V/
- https://redis.io/
- https://security.gentoo.org/glsa/202107-20