{"id":"CVE-2021-32765","aliases":["CVE-2021-32765"],"related":[],"kind":"vulnerability","state":"published","title":"Integer Overflow to Buffer Overflow in Hiredis","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"Hiredis es una librería cliente minimalista en C para la base de datos Redis. En las versiones afectadas, Hiredis es vulnerable al desbordamiento de enteros si se proporcionan datos del protocolo \"RESP\" \"multi-bulk\" maliciosamente diseñados o corruptos. Cuando se analizan las respuestas \"multi-bulk\" (tipo array), hiredis no comprueba si \"count * sizeof(redisReply*)\" puede representarse en \"SIZE_MAX\". Si no puede, y la llamada a \"calloc()\" no hace por sí misma esta comprobación, se produciría una asignación corta y el consiguiente desbordamiento del búfer. Los usuarios de hiredis que no puedan actualizar pueden establecer la opción de contexto [maxelements](https://github.com/redis/hiredis#reader-max-array-elements) a un valor lo suficientemente pequeño como para que no sea posible el desbordamiento","source":"nvd"}],"published":"2021-10-04T00:00:00.000Z","modified":"2026-06-17T03:53:35.097Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-190","CWE-680"],"affected":[{"ranges":[{"version":"< 1.0.1","status":"affected"}],"vendor":"redis","product":"hiredis","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"1.0.1"}],"vendor":"redis","product":"hiredis","cpe":"cpe:2.3:a:redis:hiredis:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"9.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"management_services_for_element_software_and_netapp_hci","cpe":"cpe:2.3:a:netapp:management_services_for_element_software_and_netapp_hci:-:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2","tags":["mitigation","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/redis/hiredis/commit/76a7b10005c70babee357a7d0f2becf28ec7ed1e","tags":["patch","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://wiki.sei.cmu.edu/confluence/display/c/MEM07-C.+Ensure+that+the+arguments+to+calloc%28%29%2C+when+multiplied%2C+do+not+wrap","tags":["third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/10/msg00007.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20211104-0003/","tags":["third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.gentoo.org/glsa/202210-32","tags":["third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-32765","url":"https://www.cve.org/CVERecord?id=CVE-2021-32765","licence":"CVE Terms of Use","modified":"2024-08-03T23:33:55.893Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-32765","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32765","licence":"Public domain","modified":"2026-06-17T03:53:35.097Z"}],"updatedAt":"2026-11-25T22:58:04.294Z","epss":{"score":0.02055,"percentile":0.81834,"date":"2026-12-01T12:00:22.000Z"}}