RedisDatabase / datastore · Redislabs

CVE-2021-32761

HIGH · 7.5 CVSS v3.1 Published 2021-07-21
Fix available
A fix is available. Upgrade to 5.0.13 / 6.0.15 or later.
See remediation →
81/100
Remediation priority · High
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Redis is an in-memory database that persists on disk. A vulnerability involving out-of-bounds read and integer overflow to buffer overflow exists starting with version 2.2 and prior to versions 5.0.13, 6.0.15, and 6.2.5. On 32-bit systems, Redis `*BIT*` command are vulnerable to integer overflow that can potentially be exploited to corrupt the heap, leak arbitrary heap contents or trigger remote code execution. The vulnerability involves changing the default `proto-max-bulk-len` configuration parameter to a very large value and constructing specially crafted commands bit commands. This problem only affects Redis on 32-bit platforms, or compiled as a 32-bit binary. Redis versions 5.0.`3m 6.0.15, and 6.2.5 contain patches for this issue. An additional workaround to mitigate the problem without patching the `redis-server` executable is to prevent users from modifying the `proto-max-bulk-len` configuration parameter. This can be done using ACL to restrict unprivileged users from using the CONFIG SET command.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A buffer overflow vulnerability exists in Redis 32-bit installations where integer overflow in the *BIT* commands combined with a large proto-max-bulk-len configuration value allows heap corruption, arbitrary heap content leakage, and potential remote code execution.

MitigationUpgrade Redis to versions 5.0.13, 6.0.15, or 6.2.5 or later. Alternatively, use ACLs to restrict unprivileged users from executing the CONFIG SET command to prevent modification of proto-max-bulk-len.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
RedisDatabase / datastore
Affected:>= 2.2.0, < 5.0.13>= 6.0, < 6.0.15>= 6.2.0, < 6.2.5
Debian LinuxOperating system
Affected:= 9.0= 10.0= 11.0
FedoraOperating system
Affected:= 33= 34

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
High
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Redis architecture
    Run 'redis-server --version' or check process info. On 32-bit systems, the version output may indicate '32-bit' or check if the binary is compiled for i386/i686 architecture using 'file $(which redis-server)'
    Affected if Running a 32-bit Redis binary (the vulnerability only affects 32-bit installations)
  2. Check installed Redis version
    Run 'redis-server --version' or query at runtime with 'redis-cli INFO server' and look for 'redis_version' field
    Affected if Version is 2.2.0 to 5.0.12, 6.0 to 6.0.14, or 6.2.0 to 6.2.4
  3. Verify proto-max-bulk-len configuration
    Run 'redis-cli CONFIG GET proto-max-bulk-len' to see the current value
    Affected if Value is set to a large number (default is 512mb, but exploitation requires a large value combined with BIT commands)
  4. Check if CONFIG SET is permitted
    Run 'redis-cli ACL LIST' to see user permissions, or attempt 'redis-cli CONFIG SET proto-max-bulk-len 536870912' to test if configuration can be modified
    Affected if Unprivileged users can execute CONFIG SET to modify proto-max-bulk-len
  5. Confirm BIT command accessibility
    Run 'redis-cli ACL LIST' or test with 'redis-cli BITCOUNT test' to verify BIT commands are available to connecting users
    Affected if BIT commands are accessible to untrusted users without proper ACL restrictions

You are affected if running a 32-bit Redis version within the affected range (2.2.0-5.0.12, 6.0-6.0.14, 6.2.0-6.2.4) where CONFIG SET and BIT commands are accessible to allow manipulation of proto-max-bulk-len.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Upgrade available Upgrade to 5.0.13 / 6.0.15 / 6.2.5 or later
Fixed in 5.0.136.0.156.2.5
Interim mitigation

Upgrade Redis to versions 5.0.13, 6.0.15, or 6.2.5 or later. Alternatively, use ACLs to restrict unprivileged users from executing the CONFIG SET command to prevent modification of proto-max-bulk-len.

Fix this in Redis Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA2.0 h
20.0 hours of engineering $3,500
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,600.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-32761 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-32761 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data