CVE-2021-32625
📋 TL;DR
CVE-2021-32625 is an integer overflow vulnerability in Redis versions 6.0+ that allows remote attackers to corrupt heap memory via the STRALGO LCS command. This could lead to remote code execution on affected Redis servers. Organizations running Redis 6.0.0-6.0.13 or 6.2.0-6.2.3 are vulnerable.
💻 Affected Systems
- Redis
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Redis by Redislabs
Redis by Redislabs
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with full control of the Redis server, potentially leading to complete system compromise.
Likely Case
Denial of service through heap corruption and Redis server crashes.
If Mitigated
No impact if ACL prevents STRALGO LCS usage or if proto-max-bulk-len is properly configured on patched systems.
🎯 Exploit Status
Exploitation requires sending specially crafted STRALGO LCS commands. The vulnerability is a continuation of CVE-2021-29477 with incomplete fixes.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 6.0.14 or 6.2.4
Vendor Advisory: https://github.com/redis/redis/security/advisories/GHSA-46cp-x4x9-6pfq
Restart Required: Yes
Instructions:
1. Download Redis 6.0.14 or 6.2.4 from official sources. 2. Stop Redis service. 3. Install the new version. 4. Restart Redis service. 5. Verify version with 'redis-server --version'.
🔧 Temporary Workarounds
ACL Restriction
allPrevent clients from using the STRALGO LCS command via Redis ACL configuration
redis-cli ACL SETUSER default -STRALGO
Configuration Limitation
allSet proto-max-bulk-len to less than 2GB on 64-bit systems with CVE-2021-29477 fixes
redis-cli CONFIG SET proto-max-bulk-len 1073741824
🧯 If You Can't Patch
- Implement ACL to block STRALGO LCS command usage
- Configure proto-max-bulk-len to less than 2GB on systems with CVE-2021-29477 fixes
🔍 How to Verify
Check if Vulnerable:
Check Redis version: if between 6.0.0-6.0.13 or 6.2.0-6.2.3, system is vulnerable.
Check Version:
redis-server --version
Verify Fix Applied:
Verify Redis version is 6.0.14+ or 6.2.4+ and test STRALGO LCS command returns proper error or expected results.
📡 Detection & Monitoring
Log Indicators:
- Multiple STRALGO LCS command failures
- Redis server crashes or abnormal terminations
Network Indicators:
- Unusual volume of STRALGO LCS commands from single source
- Large payloads sent to Redis STRALGO command
SIEM Query:
source="redis.log" AND "STRALGO LCS" AND (error OR crash OR exception)
🔗 References
- https://github.com/redis/redis/releases/tag/6.0.14
- https://github.com/redis/redis/releases/tag/6.2.4
- https://github.com/redis/redis/security/advisories/GHSA-46cp-x4x9-6pfq
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BHWOF7CBVUGDK3AN6H3BN3VNTH2TDUZZ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SN7INTZFE34MIQJO7WDDTIY5LIBGN6GI/
- https://github.com/redis/redis/releases/tag/6.0.14
- https://github.com/redis/redis/releases/tag/6.2.4
- https://github.com/redis/redis/security/advisories/GHSA-46cp-x4x9-6pfq
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BHWOF7CBVUGDK3AN6H3BN3VNTH2TDUZZ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SN7INTZFE34MIQJO7WDDTIY5LIBGN6GI/