Every CVE Search/ Get API key

CVE-2021-32765

Integer Overflow to Buffer Overflow in Hiredis

8.8 HighFix available

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 context option to a value small enough that no overflow is possible.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.05%Up 1.2 points since Oct 5, 2021
90%50%10%1%

What each source reports

CVE List Score used 8.8

Integer Overflow to Buffer Overflow in Hiredis

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 context option to a value small enough that no overflow is possible.

Record
CVE-2021-32765
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-190, CWE-680
Updated
2026-11-02
EUVDEUVD-2021-19533 8.8

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 context option to a value small enough that no overflow is possible.

Record
EUVD-2021-19533
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
NVD 8.8

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 context option to a value small enough that no overflow is possible.

Record
CVE-2021-32765
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
6.5 MediumAV:N/AC:L/Au:S/C:P/I:P/A:P
Weakness
CWE-190, CWE-680
Updated
2026-11-02
OSV 8.8

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 context option to a value small enough that no overflow is possible.

Record
CVE-2021-32765
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-32765 8.8

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 context option to a value small enough that no overflow is possible.

Record
DEBIAN-CVE-2021-32765
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVOESA-2021-1390 8.8

hiredis security update

Hiredis is a minimalistic C client library for the Redis database. It is minimalistic because it just adds minimal support for the protocol, but at the same time it uses a high level printf-alike API in order to make it much higher level than otherwise suggested by its minimal code base and the lack of explicit bindings for every Redis command.

Security Fix(es):

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 context option to a value small enough that no overflow is possible.(CVE-2021-32765)

Record
OESA-2021-1390
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVUBUNTU-CVE-2021-32765 8.8

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 context option to a value small enough that no overflow is possible.

Record
UBUNTU-CVE-2021-32765
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVMGASA-2021-0562 No score

Updated hiredis packages fix security vulnerability

Updated hiredis packages fix security vulnerability:

It was discovered that there was an integer-overflow vulnerability in hiredis, a C client library for communicating with Redis databases. This occurred within the handling and parsing of 'multi-bulk' replies (CVE-2021-32765).

Record
MGASA-2021-0562
Updated
2026-11-02
OSVopenSUSE-SU-2021:1536-1 No score

Security update for hiredis

This update for hiredis fixes the following issues:

  • CVE-2021-32765: Fix integer/buffer (boo#1191331)
Record
openSUSE-SU-2021:1536-1
Updated
2026-11-02
OSVopenSUSE-SU-2021:1550-1 No score

Security update for hiredis

This update for hiredis fixes the following issues:

  • CVE-2021-32765: Fix integer/buffer (boo#1191331)

This update was imported from the openSUSE:Leap:15.2:Update update project.

Record
openSUSE-SU-2021:1550-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:11561-1 No score

hiredis-1.0.2-1.1 on GA media

These are all security issues fixed in the hiredis-1.0.2-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11561-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
hiredis
Debian:12
before 0.14.1-2
0.14.1-2
hiredis
Debian:13
before 0.14.1-2
0.14.1-2
hiredis
Debian:14
before 0.14.1-2
0.14.1-2
hiredis
Mageia:8
before 0.13.3-6.1.mga8
0.13.3-6.1.mga8
hiredis
openEuler:20.03-LTS-SP1
before 1.0.2-1.oe1
1.0.2-1.oe1
hiredis
openEuler:20.03-LTS-SP2
before 1.0.2-1.oe1
1.0.2-1.oe1
hiredis
Ubuntu:16.04:LTS
All versions, plus listed versions
0.13.1-20.13.3-10.13.3-2
None known
hiredis
SUSE:Package Hub 15 SP3
before 0.13.3-bp153.2.3.1
0.13.3-bp153.2.3.1
hiredis
openSUSE:Leap 15.2
before 0.13.3-bp153.2.3.1
0.13.3-bp153.2.3.1
hiredis
openSUSE:Leap 15.3
before 0.13.3-bp153.2.3.1
0.13.3-bp153.2.3.1
hiredis
SUSE:Package Hub 15 SP2
before 0.13.3-bp152.4.3.1
0.13.3-bp152.4.3.1
hiredis
openSUSE:Tumbleweed
before 1.0.2-1.1
1.0.2-1.1

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-32765 is a high vulnerability (CVSS 8.8) in Redis Hiredis, published October 4, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.05%, the 81st percentile. Fixed in hiredis 0.14.1-2.

References

Show 12 moreShow less
MoveEnter Open