Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2021-32675 — Functional DoS exploit for CVE-2021-32675 in Redis, leveraging oversized bulk string headers to trigger memory exhaustion. Includes usage instructions and Docker-based testing environment. | Kitploit
Tools/GitHubGitHub/rubbxalc/cve-2021-32675
Vulnerability AnalysisExploitationPenetration TestingLearning & EducationRed Teaming
GitHubrubbxalc/cve-2021-32675

CVE-2021-32675

Functional DoS exploit for CVE-2021-32675 in Redis, leveraging oversized bulk string headers to trigger memory exhaustion. Includes usage instructions and Docker-based testing environment.

View Repository
20h 22m agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2021-32675 – Redis Pre-Allocation Denial of Service (OOM)

This repository contains a functional exploit for CVE-2021-32675, a denial-of-service (DoS) vulnerability in Redis. The flaw allows unauthenticated remote attackers to trigger massive memory pre-allocations on the Redis server by sending oversized bulk string headers without providing argument data, leading to memory exhaustion and service crash.

Description

CVE-2021-32675 is a vulnerability in Redis query buffer handling. When parsing incoming commands in the RESP (REdis Serialization Protocol) protocol, Redis reads the declared length of a bulk string argument ($<length>\r\n) and immediately pre-allocates an SDS (Simple Dynamic String) buffer in memory to receive the payload before reading any argument bytes.

Because this pre-allocation occurs before receiving the argument payload, an unauthenticated client can declare the maximum permitted bulk string size (by default, proto-max-bulk-len is 512 MB) and hold the connection open indefinitely without transmitting the actual data. Redis retains the pre-allocated memory for each active connection, creating an amplification ratio of approximately 32,000,000× (~16 bytes of network traffic results in a 512 MB memory reservation).

Opening multiple concurrent connections using this header-only technique quickly exhausts available server memory, causing:

  • Forced key evictions if a maxmemory policy is active.
  • Denial of service by rejecting subsequent write operations ().
OOM command not allowed
  • Process termination by the operating system OOM (Out-Of-Memory) killer.
  • The vulnerability affects Redis versions prior to:

    • 6.2.6
    • 6.0.16
    • 7.0 (when unauthenticated or running with default bulk limits)

    Redis instances running without authentication (requirepass not configured) or with default proto-max-bulk-len (512 MB) are vulnerable to this exploit. Patched versions enforce a strict 16 KB protocol buffer limit for unauthenticated clients before pre-allocation takes place.

    Installation Instructions

    1. Create a Virtual Environment (Optional but Recommended):
    root@kitploit:~
    python3 -m venv .venv
    source .venv/bin/activate
    
    1. Install Dependencies:
    root@kitploit:~
    pip install -r requirements.txt
    

    Requirements

    • Python 3.8+

      • colorama library
      • redis library
    • Vulnerable Redis instance (versions prior to 6.2.6 / 6.0.16 or unauthenticated instances)

    Usage

    root@kitploit:~
    python3 exploit.py --host <IP> --port <PORT> [options]
    

    Options

    OptionTypeDefaultDescription
    --hoststrRequiredTarget Redis hostname or IP address
    --portint6379Port number
    --connectionsint10Number of malicious connections to open
    --sizeint512Declared bulk string buffer size in MB
    --holdint5Seconds to hold connections open before cleanup
    --password, --authstrNonePassword for Redis authentication (if needed)

    Example

    root@kitploit:~
    python3 exploit.py --host 127.0.0.1 --port 6379 --connections 10 --size 512 --hold 5
    

    Local Testing Environment (Optional)

    You can launch a local test lab using the included Docker Compose configuration:

    root@kitploit:~
    # Start vulnerable Redis (port 6380) and mitigated Redis (port 6381)
    docker compose -f conf/docker-compose.yml up -d
    
    # Test against the vulnerable instance
    python3 exploit.py --host 127.0.0.1 --port 6380 --connections 10 --size 512
    
    # Test against the mitigated instance
    python3 exploit.py --host 127.0.0.1 --port 6381 --password "L4bS3cur3!2024" --connections 10 --size 512
    
    # Stop the containers
    docker compose -f conf/docker-compose.yml down
    

    Disclaimer

    This Proof of Concept is provided for educational, research, and security verification purposes only. The author is not responsible for any misuse, damage, or unauthorized testing against systems without explicit permission.

    Download Tool