The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-32762

CVE-2021-32762: Redis Buffer Overflow Vulnerability

CVE-2021-32762 is a buffer overflow vulnerability in Redis redis-cli and redis-sentinel caused by integer overflow in the hiredis library. This article covers the technical details, affected versions, and mitigation steps.

Published: February 25, 2026

CVE-2021-32762 Overview

CVE-2021-32762 is an Integer Overflow vulnerability affecting Redis, 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 vulnerability stems from a flaw in the underlying hiredis library, which fails to perform an overflow check before calling the calloc() heap allocation function.

Critical Impact

An authenticated attacker with network access could exploit this integer overflow to potentially achieve remote code execution or cause denial of service on affected systems that use heap allocators without built-in overflow checks.

Affected Products

  • Redis versions prior to 6.2.6
  • Redis versions prior to 6.0.16
  • Redis versions prior to 5.0.14
  • Debian Linux 10.0 and 11.0
  • Fedora 33, 34, and 35
  • NetApp Management Services for Element Software and NetApp HCI
  • Oracle Communications Operations Monitor 4.3, 4.4, and 5.0

Discovery Timeline

  • 2021-10-04 - CVE-2021-32762 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-32762

Vulnerability Analysis

This vulnerability exists within the hiredis library used by Redis client tools. When redis-cli or redis-sentinel processes specially crafted multi-bulk network replies containing extremely large element counts, an integer overflow can occur during memory allocation calculations. The root issue is that the code multiplies the number of elements by the size of a pointer (sizeof(redisReply*)) without first checking if this multiplication would exceed the maximum representable value (SIZE_MAX).

When the overflow occurs, the calloc() function receives a significantly smaller size than intended, resulting in a heap buffer that is too small to hold the actual data. This can lead to heap corruption when subsequent data is written beyond the allocated buffer boundaries.

The practical exploitability of this vulnerability is somewhat limited by the fact that most modern heap allocators (including jemalloc, which is the default allocator for redis-sentinel) perform their own overflow checks. However, systems using allocators without such protections remain at risk.

Root Cause

The vulnerability is classified as CWE-190 (Integer Overflow or Wraparound). The hiredis library's createReplyObject() function calculates the allocation size by multiplying the number of elements by the pointer size without validating that the result does not overflow. When processing maliciously crafted responses with extremely large element counts, this calculation can wrap around, causing calloc() to allocate a smaller buffer than required.

Attack Vector

An attacker with authenticated network access to a Redis server could craft a malicious server response containing an extremely large multi-bulk reply. When a vulnerable redis-cli or redis-sentinel client parses this response, the integer overflow occurs during memory allocation. The attack requires the attacker to either control a malicious Redis server that the victim connects to, or perform a man-in-the-middle attack to inject malicious responses.

The following patch demonstrates the fix implemented in the hiredis library:

c
         return NULL;
 
     if (elements > 0) {
+        if (SIZE_MAX / sizeof(redisReply*) < elements) return NULL;  /* Don't overflow */
         r->element = hi_calloc(elements,sizeof(redisReply*));
         if (r->element == NULL) {
             freeReplyObject(r);

Source: GitHub Commit

The patch adds a bounds check that verifies the element count will not cause an overflow when multiplied by the pointer size. If the check fails, the function safely returns NULL rather than proceeding with an undersized allocation.

Detection Methods for CVE-2021-32762

Indicators of Compromise

  • Monitor for abnormally large Redis protocol responses, particularly multi-bulk replies with element counts approaching the maximum integer value
  • Watch for unexpected crashes or segmentation faults in redis-cli or redis-sentinel processes
  • Look for heap corruption indicators or memory-related errors in Redis client logs

Detection Strategies

  • Implement network monitoring to detect anomalous Redis protocol traffic with unusually large array sizes
  • Deploy endpoint detection solutions to monitor for exploitation attempts against Redis client processes
  • Use application-level logging to track Redis client connection failures and parsing errors
  • Configure intrusion detection systems to alert on Redis protocol anomalies

Monitoring Recommendations

  • Enable detailed logging for redis-cli and redis-sentinel operations to capture potential exploitation attempts
  • Monitor system logs for out-of-memory errors or segmentation faults associated with Redis processes
  • Track Redis client version deployments across the environment to identify vulnerable instances
  • Implement network traffic analysis for Redis connections to detect malformed protocol responses

How to Mitigate CVE-2021-32762

Immediate Actions Required

  • Upgrade Redis to version 6.2.6, 6.0.16, or 5.0.14 depending on your current major version
  • Audit all systems running redis-cli or redis-sentinel and prioritize patching
  • Review network segmentation to limit exposure of Redis clients to untrusted networks
  • Verify the heap allocator in use on affected systems to assess actual risk level

Patch Information

Redis has released patched versions that include the fixed hiredis library. The fix adds a bounds check before the calloc() call to prevent integer overflow. Organizations should upgrade to:

  • Redis 6.2.6 or later for the 6.2.x branch
  • Redis 6.0.16 or later for the 6.0.x branch
  • Redis 5.0.14 or later for the 5.0.x branch

Additional vendor patches are available from Debian Security Advisory DSA-5001, Fedora Package Announcements, NetApp Security Advisory, and Oracle Security Alert.

Workarounds

  • Systems using jemalloc (the default for redis-sentinel) are not likely vulnerable, but upgrading is still recommended
  • Restrict network access to Redis clients to trusted networks only
  • Implement TLS encryption and authentication for Redis connections to prevent man-in-the-middle attacks
  • Consider using a heap allocator that performs overflow checks if immediate patching is not possible
bash
# Verify current Redis version
redis-cli --version

# Check for vulnerable versions and update via package manager (Debian/Ubuntu)
apt-get update && apt-get install redis-server redis-tools

# Verify heap allocator in use (systems using jemalloc are less vulnerable)
redis-cli INFO | grep mem_allocator

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechRedis

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.94%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-190
  • Technical References
  • GitHub Security Advisory

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Gentoo GLSA Advisory

  • NetApp Security Advisory

  • Debian Security Advisory
  • Vendor Resources
  • GitHub Commit Update

  • Oracle Security Alert
  • Related CVEs
  • CVE-2025-27151: Redis Buffer Overflow Vulnerability

  • CVE-2021-32672: Redis Buffer Overflow Vulnerability

  • CVE-2026-27022: LangGraph Redis Checkpoint SQL Injection

  • CVE-2025-46817: Redis Lua Scripting RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English