CVE-2021-32627

7.5 HIGH

📋 TL;DR

CVE-2021-32627 is an integer overflow vulnerability in Redis that allows remote attackers to corrupt heap memory by setting configuration parameters to very large values and sending specially crafted stream elements. This can potentially lead to remote code execution. All Redis users running affected versions are vulnerable if attackers can modify configuration parameters.

💻 Affected Systems

Products:
  • Redis
Versions: All versions before 6.2.6, 6.0.16, and 5.0.14
Operating Systems: All operating systems running Redis
Default Config Vulnerable: ✅ No
Notes: Requires attackers to modify proto-max-bulk-len and client-query-buffer-limit configuration parameters to exploit.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with full compromise of the Redis server, potentially leading to data theft, system takeover, or lateral movement.

🟠

Likely Case

Denial of service through heap corruption causing Redis crashes, with potential for information disclosure from memory.

🟢

If Mitigated

Limited impact if ACL restrictions prevent unauthorized configuration changes, though DoS may still be possible.

🌐 Internet-Facing: HIGH - Redis instances exposed to the internet are directly vulnerable to remote exploitation.
🏢 Internal Only: MEDIUM - Internal Redis instances are vulnerable to authenticated attackers or those who gain initial access to the network.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires ability to modify Redis configuration parameters via CONFIG SET command.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Redis 6.2.6, 6.0.16, or 5.0.14

Vendor Advisory: https://github.com/redis/redis/security/advisories/GHSA-f434-69fm-g45v

Restart Required: Yes

Instructions:

1. Download patched Redis version from official repository. 2. Stop Redis service. 3. Install patched version. 4. Restart Redis service. 5. Verify version with 'redis-server --version'.

🔧 Temporary Workarounds

ACL Restriction for CONFIG SET

all

Prevent unprivileged users from modifying configuration parameters using Redis ACL.

ACL SETUSER <username> -@all +ping +info +get +set +... (exclude +config)

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Redis from untrusted networks
  • Use Redis ACL to restrict all users from using CONFIG SET command

🔍 How to Verify

Check if Vulnerable:

Check Redis version with 'redis-server --version' or 'redis-cli info server | grep redis_version'. If version is before 6.2.6, 6.0.16, or 5.0.14, system is vulnerable.

Check Version:

redis-server --version

Verify Fix Applied:

Verify version is 6.2.6, 6.0.16, 5.0.14 or later using 'redis-server --version'.

📡 Detection & Monitoring

Log Indicators:

  • Unusual CONFIG SET commands in Redis logs
  • Redis crashes with heap corruption errors
  • Large stream element operations

Network Indicators:

  • Multiple CONFIG SET commands from single source
  • Unusually large payloads sent to Redis

SIEM Query:

source="redis.logs" AND ("CONFIG SET proto-max-bulk-len" OR "CONFIG SET client-query-buffer-limit")

🔗 References

📤 Share & Export