CVE-2021-32765 json
Integer Overflow to Buffer Overflow in Hiredis
published 2021-10-04 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-19533
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.1%
- EPSS 2.1% chance of exploitation in 30 days, percentile 81%
- public exploits
- 0
- none known
Summary
Hiredis is a minimalistic C client library for the Redis database. In affected versions Hiredis is vulnurable to integer overflow if provided maliciously crafted or corrupted `RESP` `mult-bulk` protocol data. When parsing `multi-bulk` (array-like) replies, hiredis fails to check if `count * sizeof(redisReply*)` can be represented in `SIZE_MAX`. If it can not, and the `calloc()` call doesn't itself make this check, it would result in a short allocation and subsequent buffer overflow. Users of hiredis who are unable to update may set the [maxelements](https://github.com/redis/hiredis#reader-max-array-elements) context option to a value small enough that no overflow is possible.
Patch / fix
- redis hiredis 1.0.1
- hiredis Debian 14, Debian 13, Debian 12 0.14.1-2
debian advisories DEBIAN-CVE-2021-32765
- hiredis openSUSE Tumbleweed 1.0.2-1.1
- hiredis Package Hub 15 SP2 0.13.3-bp152.4.3.1
- hiredis Package Hub 15 SP3, openSUSE Leap 15.3, openSUSE Leap 15.2 0.13.3-bp153.2.3.1
opensuse advisories openSUSE-SU-2024:11561-1openSUSE-SU-2021:1550-1openSUSE-SU-2021:1536-1
- hiredis Arch Linux 1.0.1-1
arch linux advisories AVG-2441
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-32765 updated cvss 8.8
hiredis: an integer overflow may occur if provided maliciously crafted or corrupted RESP mult-bulk protocol data
-
Red Hat Ansible Automation Platform 1.2 hiredis Red Hat Ansible Tower 3 hiredisnot affected: vulnerable code not present
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
2.05% chance of exploitation in the next 30 days, higher than 81% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 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 hiredis
Classification
References
-
github.com
/redis/hiredis/commit/76a7b10005c70babee357a7d0f2becf28ec7ed1e
patch, third-party-advisory
-
security.gentoo.org
/glsa/202210-32
vendor-advisory, third-party-advisory
-
github.com
/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2
mitigation, third-party-advisory
-
wiki.sei.cmu.edu
/confluence/display/c/MEM07-C.+Ensure+that+the+arguments+to+calloc%28%29%2C+when+multiplied%2C+do+not+wrap
third-party-advisory
-
lists.debian.org
/debian-lts-announce/2021/10/msg00007.html
mailing-list, third-party-advisory
-
security.netapp.com
/advisory/ntap-20211104-0003/
third-party-advisory
Sources
- CVE List CVE-2021-32765
- NVD CVE-2021-32765
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.