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-31294

CVE-2021-31294: Redis DOS Vulnerability via Replica

CVE-2021-31294 is a denial-of-service vulnerability in Redis where a replica can trigger an assertion failure in the primary server using a SET command. This article covers technical details, affected versions, and fixes.

Published: February 25, 2026

CVE-2021-31294 Overview

CVE-2021-31294 is a denial of service vulnerability in Redis that allows a replica to cause an assertion failure in a primary server by sending a non-administrative command, specifically a SET command. This vulnerability affects Redis versions before commit 6cbea7d and was addressed in Redis 6.2.x and 7.x releases in 2021. Versions before 6.2 were not intended to have safety guarantees related to this behavior.

Critical Impact

A malicious or compromised replica can crash the primary Redis server by triggering an assertion failure, resulting in denial of service for all clients depending on the Redis instance.

Affected Products

  • Redis (versions before 6.2.x)
  • Redis (versions before commit 6cbea7d29b5285692843bc1c351abba1a7ef326f)
  • Redis (versions before commit 46f4ebbe842620f0976a36741a72482620aa4b48)

Discovery Timeline

  • July 15, 2023 - CVE-2021-31294 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-31294

Vulnerability Analysis

This vulnerability is classified under CWE-617 (Reachable Assertion), which occurs when the product contains an assertion that can be triggered by an attacker. In Redis, the primary-replica replication model typically restricts replicas to only sending certain administrative commands to the primary server. However, before the security fix was applied, there was insufficient validation of commands sent by replica connections, allowing replicas to send keyspace-interacting commands such as SET.

When a replica sends a non-administrative command like SET to the primary server, it violates an internal assumption in the codebase, triggering an assertion failure. Assertion failures in C programs typically result in the process being terminated via abort(), causing an immediate crash of the Redis primary server.

Root Cause

The root cause of this vulnerability lies in the insufficient command validation for replica connections in src/server.c. The Redis server did not properly distinguish between read commands and other keyspace-interacting commands when processing requests from replica connections. This allowed replicas to bypass the intended command restrictions and execute operations that should only be permitted from regular client connections.

Attack Vector

The attack requires network access to a Redis primary server from a replica connection. An attacker who has compromised a replica server, or who can establish a malicious replica connection to the primary, can exploit this vulnerability. The attack is executed by:

  1. Establishing a replica connection to the target Redis primary server
  2. Sending a non-administrative command (such as SET) that interacts with the keyspace
  3. The primary server processes the unexpected command and triggers an assertion failure
  4. The Redis primary server crashes, causing denial of service
c
// Security patch from src/server.c - Prevent replicas from sending commands that interact with keyspace (#8868)
         return C_OK;
     }
 
+    int is_read_command = (c->cmd->flags & CMD_READONLY) ||
+                           (c->cmd->proc == execCommand && (c->mstate.cmd_flags & CMD_READONLY));
     int is_write_command = (c->cmd->flags & CMD_WRITE) ||
                            (c->cmd->proc == execCommand && (c->mstate.cmd_flags & CMD_WRITE));
     int is_denyoom_command = (c->cmd->flags & CMD_DENYOOM) ||

Source: GitHub Redis Commit Update

Detection Methods for CVE-2021-31294

Indicators of Compromise

  • Unexpected Redis primary server crashes or restarts without apparent cause
  • Assertion failure messages in Redis logs from src/server.c
  • Unusual SET or other write commands originating from replica connections in audit logs
  • Multiple rapid reconnection attempts from replicas following primary crashes

Detection Strategies

  • Monitor Redis log files for assertion failure messages and abnormal termination events
  • Implement network monitoring to detect non-standard command patterns from replica IP addresses
  • Use Redis CLIENT LIST command to audit active replica connections and their command history
  • Deploy application-level monitoring to alert on unexpected Redis primary server downtime

Monitoring Recommendations

  • Configure alerting for Redis process crashes and unexpected restarts
  • Implement replica connection authentication and monitor for unauthorized replica connection attempts
  • Enable Redis slow log and command logging to track commands sent by replica connections
  • Set up health checks that can detect assertion failures in Redis primary servers

How to Mitigate CVE-2021-31294

Immediate Actions Required

  • Upgrade Redis to version 6.2.x or later, which includes the security fix
  • Audit all replica connections to ensure they are from trusted sources
  • Implement network segmentation to restrict which hosts can establish replica connections
  • Enable Redis authentication using requirepass and masterauth directives

Patch Information

The vulnerability was fixed in commits 6cbea7d29b5285692843bc1c351abba1a7ef326f and 46f4ebbe842620f0976a36741a72482620aa4b48. The patch adds proper validation for read commands from replica connections, preventing replicas from sending commands that interact with the keyspace inappropriately. Users should upgrade to Redis 6.2.x or 7.x to receive this fix. Additional information is available in the GitHub Redis Issue Tracker and the NetApp Security Advisory NTAP-20230814-0007.

Workarounds

  • Restrict network access to Redis primary servers using firewall rules to allow only trusted replica IPs
  • Implement TLS for replica connections to ensure authenticated and encrypted communication
  • Monitor replica behavior using Redis monitoring tools and terminate suspicious connections
  • Consider deploying Redis Sentinel or Cluster mode with proper authentication for enhanced security
bash
# Configuration example - Redis authentication and network restrictions
# In redis.conf on primary server:
requirepass your_strong_password_here
masterauth your_strong_password_here

# Bind to specific interfaces only
bind 127.0.0.1 10.0.0.1

# Enable TLS for replica connections (Redis 6+)
tls-replication yes
tls-cert-file /path/to/redis.crt
tls-key-file /path/to/redis.key
tls-ca-cert-file /path/to/ca.crt

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechRedis

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability0.21%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-617
  • Technical References
  • GitHub Redis Issue Tracker

  • NetApp Security Advisory NTAP-20230814-0007
  • Vendor Resources
  • GitHub Redis Commit Update

  • GitHub Redis Commit Change
  • Related CVEs
  • CVE-2025-21605: Redis Database DoS Vulnerability

  • CVE-2024-31228: Redis Database DOS Vulnerability

  • CVE-2025-48367: Redis Database DOS Vulnerability

  • CVE-2024-51741: Redis Database DOS 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