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.
Published 2021-10-04 21:15:13
Updated 2022-12-07 01:52:56
Source GitHub, Inc.
View at NVD,   CVE.org
Vulnerability category: Overflow

Products affected by CVE-2021-32765

Exploit prediction scoring system (EPSS) score for CVE-2021-32765

3.61%
Probability of exploitation activity in the next 30 days EPSS Score History
~ 92 %
Percentile, the proportion of vulnerabilities that are scored at or less

CVSS scores for CVE-2021-32765

Base Score Base Severity CVSS Vector Exploitability Score Impact Score Score Source First Seen
6.5
MEDIUM AV:N/AC:L/Au:S/C:P/I:P/A:P
8.0
6.4
NIST
8.8
HIGH CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
2.8
5.9
NIST
8.8
HIGH CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
2.8
5.9
GitHub, Inc.

CWE ids for CVE-2021-32765

  • The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
    Assigned by:
    • nvd@nist.gov (Primary)
    • security-advisories@github.com (Secondary)
  • The product performs a calculation to determine how much memory to allocate, but an integer overflow can occur that causes less memory to be allocated than expected, leading to a buffer overflow.
    Assigned by: security-advisories@github.com (Secondary)

References for CVE-2021-32765

Jump to
This web site uses cookies for managing your session, storing preferences, website analytics and additional purposes described in our privacy policy.
By using this web site you are agreeing to CVEdetails.com terms of use!