Integer overflow on 32-bit systems
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-190 and the CVSS impact.
Summary
Redis is an open-source, in-memory database that persists on disk. In affected versions of Redis an integer overflow bug in 32-bit Redis version 4.0 or newer could be exploited to corrupt the heap and potentially result with remote code execution. Redis 4.0 or newer uses a configurable limit for the maximum supported bulk input size. By default, it is 512MB which is a safe value for all platforms. If the limit is significantly increased, receiving a large request from a client may trigger several integer overflow scenarios, which would result with buffer overflow and heap corruption. We believe this could in certain conditions be exploited for remote code execution. By default, authenticated Redis users have access to all configuration parameters and can therefore use the “CONFIG SET proto-max-bulk-len” to change the safe default, making the system vulnerable. **This problem only affects 32-bit Redis (on a 32-bit system, or as a 32-bit executable running on a 64-bit system).** The problem is fixed in version 6.2, and the fix is back ported to 6.0.11 and 5.0.11. Make sure you use one of these versions if you are running 32-bit Redis. An additional workaround to mitigate the problem without patching the redis-server executable is to prevent clients from directly executing `CONFIG SET`: Using Redis 6.0 or newer, ACL configuration can be used to block the command. Using older versions, the `rename-command` configuration directive can be used to rename the command to a random string unknown to users, rendering it inaccessible. Please note that this workaround may have an additional impact on users or operational systems that expect `CONFIG SET` to behave in certain ways.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Redis | redis | before 5.0.11; 6.0.0 to before 6.0.11 | 5.0.11, 6.0.11 | Patch available | CNA |
- redis VendorRedis Affected before 5.0.11; 6.0.0 to before 6.0.11 Fixed in 5.0.11, 6.0.11 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:redislabs:redis:*:*:*:*:*:*:*:* | 4.0 to before 5.0.11; 6.0.0 to before 6.0.11 | Vulnerable | Redis Labs |
- cpe:2.3:a:redislabs:redis:*:*:*:*:*:*:*:* Versions 4.0 to before 5.0.11; 6.0.0 to before 6.0.11 Vulnerable ·Redis Labs
Remediation
- Fix · CNA redis (redis) Fixed in 5.0.11, 6.0.11
Red Hat 1 advisory
- RHSA-2021:2461 Released 2021-06-16 · Red Hat rating ModerateRed Hat Advanced Cluster Management 2.2.4 security and bug fix update
- Red Hat Advanced Cluster Management for Kubernetes 2.2 for RHEL 7 rhacm2/management-ingress-rhel7, rhacm2/memcached-exporter-rhel7, rhacm2/openshift-hive-rhel7 +2
- Red Hat Advanced Cluster Management for Kubernetes 2.2 for RHEL 8 rhacm2/acm-must-gather-rhel8, rhacm2/acm-operator-bundle, rhacm2/acmesolver-rhel8 +47
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Advanced Cluster Management for Kubernetes 2 | Affected | No fix yet |
Not affected: 8 products
- Red Hat Advanced Cluster Management for Kubernetes 2
- Red Hat Ansible Automation Platform 1.2
- Red Hat Ansible Tower 3
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenStack Platform 10 (Newton)
- Red Hat OpenStack Platform 13 (Queens)
- Red Hat Software Collections
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21309
References
More Redis vulnerabilities
- TI-2022-00463 Missing authorization in Debian redis KEVCVSS 3.1CRITICAL 10.0
- TI-2025-31759 Redis Lua Use-After-Free may lead to remote code execution CVSS 3.1CRITICAL 10.0
- TI-2023-15161 Redis raft master-1b8bd86 to master-7b46079 was discovered to contain an ODR violation… CVSS 3.1CRITICAL 9.8
- TI-2023-18618 Heap overflow in COMMAND GETKEYS and ACL evaluation in Redis CVSS 3.1HIGH 8.8
- TI-2024-20813 Lua library commands may lead to stack overflow and RCE in Redis CVSS 3.1HIGH 8.8
- TI-2022-08647 Heap overflow issue with the Lua cjson library used by Redis CVSS 3.1HIGH 8.8
Sources
- CVE-2021-21309 · CVE Program
- CVE-2021-21309 · NVD
- FIRST EPSS
- CVE-2021-21309 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences