CVE-2021-32762
JSON

7.5high

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

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
2.58% (higher than 85% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
BIT-KEYDB-2021-32762BIT-REDIS-2021-32762BIT-VALKEY-2021-32762GHSA-833w-8v3m-8wwr

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.

Affected

Product or packageVersionsReported by
redis redis< 5.0.14, >= 6.0.0, < 6.0.16, >= 6.2.0, < 6.2.6, from 5.0.0 before 5.0.14, from 6.0.0 before 6.0.16, from 6.2.0 before 6.2.6CVE List, NVD
debian debian_linux10.0, 11.0NVD
fedoraproject fedora33, 34, 35NVD
netapp management_services_for_element_softwareNot specifiedNVD
netapp management_services_for_netapp_hciNot specifiedNVD
oracle communications_operations_monitor4.3, 4.4, 5.0NVD
keydb (Bitnami)from 5.0.0 before 5.0.14, from 6.0.0 before 6.0.16, from 6.2.0 before 6.2.6Bitnami Vulnerability Database
redis (Bitnami)from 5.0.0 before 5.0.14, from 6.0.0 before 6.0.16, from 6.2.0 before 6.2.6Bitnami Vulnerability Database
valkey (Bitnami)from 5.0.0 before 5.0.14, from 6.0.0 before 6.0.16, from 6.2.0 before 6.2.6Bitnami Vulnerability Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD9.0high CVSS:2.0AV:N/AC:L/Au:S/C:C/I:C/A:C
Bitnami Vulnerability Databasehigh rating

Classification

What each source says

CVE List

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.

NVD (es)

Redis es una base de datos en memoria de código abierto que persiste en el disco. La herramienta de línea de comandos redis-cli y el servicio redis-sentinel pueden ser vulnerables a un desbordamiento de enteros cuando analizan respuestas de red de gran tamaño especialmente diseñadas. Esto es resultado de una vulnerabilidad en la biblioteca hiredis subyacente que no lleva a cabo una comprobación de desbordamiento antes de llamar a la función de asignación de pila calloc(). Este problema sólo afecta a los sistemas con asignadores de pila que no llevan a cabo sus propias comprobaciones de desbordamiento. La mayoría de los sistemas modernos lo hacen y, por lo tanto, no es probable que estén afectados. Además, por defecto redis-sentinel usa el asignador jemalloc que tampoco es vulnerable. El problema se ha corregido en las versiones de Redis 6.2.6, 6.0.16 y 5.0.14

References

https://github.com/redis/redis/security/advisories/GHSA-833w-8v3m-8wwradvisory, third-party-advisory, web
https://github.com/redis/redis/commit/0215324a66af949be39b34be2d55143232c1cb71advisory, patch, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VL5KXFN3ATM7IIM7Q4O4PWTSRGZ5744Z/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HTYQ5ZF37HNGTZWVNJD3VXP7I6MEEF42/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WR5WKJWXD4D6S3DJCZ56V74ESLTDQRAB/vendor-advisory, web
https://www.debian.org/security/2021/dsa-5001advisory, third-party-advisory, vendor-advisory, web
https://www.oracle.com/security-alerts/cpuapr2022.htmladvisory, patch, third-party-advisory, web
https://security.netapp.com/advisory/ntap-20211104-0003/advisory, third-party-advisory, web
https://security.gentoo.org/glsa/202209-17advisory, third-party-advisory, vendor-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-32762web

Sources

SourceRecordLicence
CVE ListCVE-2021-32762 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-32762 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-KEYDB-2021-32762 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-REDIS-2021-32762 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-VALKEY-2021-32762 changed 2026-07-08Apache-2.0