CVE-2021-32762 Integer overflow that can lead to heap overflow in redis-cli, redis-sentinel on some platforms

High 7.5 Published Updated

Integer overflow in hiredis library used by redis-cli and redis-sentinel can lead to heap overflow and potential code execution on systems without allocator overflow checks.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-32762?

CVE-2021-32762 is a high-severity vulnerability in Debian Debian Linux, published on 4 Oct 2021. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Redis is an open source, in-memory database that persists on disk. The redis-cli command line tool and redis-sentinel service may be vulnerable to integer overflow when parsing specially crafted large multi-bulk network replies. This is a result of a vulnerability in the underlying hiredis library which does not perform an overflow check before calling the calloc() heap allocation function. This issue only impacts systems with heap allocators that do not perform their own overflow checks. Most modern systems do and are therefore not likely to be affected. Furthermore, by default redis-sentinel uses the jemalloc allocator which is also not vulnerable. The problem is fixed in Redis versions 6.2.6, 6.0.16 and 5.0.14.

Weakness: CWE-680, CWE-190

Which versions are affected by CVE-2021-32762?

3 open source packages ship an affected version, including keydb, redis and valkey. It affects 6 products.

PackageAffectedFixed in
keydb BitnamiFrom 5.0.05.0.14, 6.0.16, 6.2.6
redis BitnamiFrom 5.0.05.0.14, 6.0.16, 6.2.6
valkey BitnamiFrom 5.0.05.0.14, 6.0.16, 6.2.6

Products include Debian Debian Linux, Fedoraproject Fedora, Netapp Management Services for Element Software, Netapp Management Services for Netapp Hci, Oracle Communications Operations Monitor, Redis Redis.

How do I fix CVE-2021-32762?

Upgrade keydb to a fixed version for your release line: 5.0.14, 6.0.16 or 6.2.6.

Is CVE-2021-32762 being exploited?

There is no known exploitation of CVE-2021-32762 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2021-32762, AZL-61842, AZL-6851, BIT-keydb-2021-32762, BIT-redis-2021-32762, BIT-valkey-2021-32762 and 4 more.

Is CVE-2021-32762 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free