CVE-2021-21309 json
Integer overflow on 32-bit systems
published 2021-02-23 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-8663 , GHSA-hgj8-vff2-7cjf
- cvss
- 5.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 4.8%
- EPSS 4.8% chance of exploitation in 30 days, percentile 91%
- public exploits
- 0
- none known
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.
Patch / fix
- redislabs redis 5.0.11, 6.0.11
- redis Debian 14, Debian 13, Debian 12 5:6.0.11-1
debian advisories DEBIAN-CVE-2021-21309
- redis Ubuntu Pro 18.04 LTS 5:4.0.9-1ubuntu0.2+esm3
ubuntu advisories UBUNTU-CVE-2021-21309
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- redis SLE Module for Server Applications 15 SP3, SLE Module for Server Applications 15 SP2 6.0.13-1.10.1
suse advisories SUSE-SU-2021:1652-1
- redis openSUSE Tumbleweed 6.2.5-1.2
- redis openSUSE Leap 15.2 6.0.13-lp152.2.3.1
opensuse advisories openSUSE-SU-2024:11299-1openSUSE-SU-2021:0682-1
- redis Alpine 3.12, Alpine 3.11, Alpine 3.10 5.0.11-r0
- redis Alpine 3.13 6.0.11-r0
- redis Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 6.2.0-r0
alpine advisories ALPINE-CVE-2021-21309
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/redis/redis@c992857 commit
- github.com/redis/redis#8522 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-21309 updated cvss 8.8
redis: integer overflow when configurable limit for maximum supported bulk input size is too big on 32-bit platforms
-
Red Hat Advanced Cluster Management for Kubernetes 2 redisgraph-tls-rhel8affected: workaround, no fix available
-
Red Hat Advanced Cluster Management for Kubernetes 2 search-api Red Hat Ansible Automation Platform 1.2 redis Red Hat Ansible Tower 3 redis Red Hat Enterprise Linux 8 redis Red Hat Enterprise Linux 9 redis Red Hat OpenStack Platform 10 (Newton) redisnot affected: vulnerable code not present
+2 more productsfewer
Red Hat OpenStack Platform 13 (Queens) redis Red Hat Software Collections rh-redis5-redis
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
4.79% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 6.5 | AV:N/AC:L/Au:S/C:P/I:P/A:P |
Affected products
- redis redis
Classification
- Weakness
-
- CWE-190 Integer Overflow or Wraparound
- Technology feeds
References
-
github.com
/redis/redis/commit/c992857618db99776917f10bf4f2345a5fdc78b0
patch, third-party-advisory
-
github.com
/redis/redis/pull/8522
patch, third-party-advisory
-
security.gentoo.org
/glsa/202103-02
vendor-advisory, third-party-advisory
-
github.com
/redis/redis/security/advisories/GHSA-hgj8-vff2-7cjf
third-party-advisory, advisory
Sources
- CVE List CVE-2021-21309
- NVD CVE-2021-21309
- Maintainer advisory GHSA-hgj8-vff2-7cjf
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of redis/redis published their own advisory on GitHub. Reviewed sources take precedence over it.