VDB

CVE-2021-32765

CVE-2021-32765 PUBLISHED CVSS 8.8 HIGH

Integer Overflow to Buffer Overflow in Hiredis

Reported by github_m · Published October 4, 2021

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
hiredisArch Linux1.0.1-1
hiredisredis1.0.1

Risk scores

CVSS 3.1
8.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
redishiredis< 1.0.1
archhiredis0
redishiredis0

Timeline

  • Oct 4, 2021 CVE Published
  • Oct 5, 2021 EPSS Score (30 in total, the first dated here)
  • Aug 3, 2024 CVE Updated
  • Mar 10, 2026 Security Advisory (3 in total, the first dated here)
  • Aug 1, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-32765
vulnetix vdb fixes CVE-2021-32765

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-32765/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›