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-2026-25589-25588-25243-23631-23479-REDIS — Diagnostic and remediation script for five Redis CVEs, providing scanning, ACL-based mitigation, and configuration hardening guidance for authenticated RCE vulnerabilities. | Kitploit
Tools/GitHubGitHub/mgiay/cve-2026-25589-25588-25243-23631-23479-redis
Vulnerability AnalysisConfiguration AuditingLearning & EducationCurated ResourcesDatabase Security
GitHubmgiay/cve-2026-25589-25588-25243-23631-23479-redis

CVE-2026-25589-25588-25243-23631-23479-REDIS

Diagnostic and remediation script for five Redis CVEs, providing scanning, ACL-based mitigation, and configuration hardening guidance for authenticated RCE vulnerabilities.

View Repository
3 months 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

GUIDE TO CHECKING & REMEDIATING 5 REDIS CVEs AS OF 2026.05.08

Release date: 2026-05-08 Author: TonyCao ([email protected]) Source: Redis Security Advisory


TABLE OF CONTENTS

  1. Overview
  2. Affected Versions
  3. Details of Each CVE
    • CVE-2026-23479 — Use-after-free in Unblock Client Flow
    • CVE-2026-25243 — Invalid Memory Access in RESTORE
    • CVE-2026-25588 — RESTORE with RedisTimeSeries Module
    • CVE-2026-25589 — RESTORE with RedisBloom Module
    • CVE-2026-23631 — Lua Use-After-Free via Master-Replica Sync
  4. Script Usage Guide
  5. Common Remediation Methods
  6. Risk Assessment — Internal Redis / Sentinel Systems
  7. ACL Reference
  8. Periodic Inspection Procedure
  9. Frequently Asked Questions (FAQ)

OVERVIEW

On 05/05/2026, Redis Ltd. published a security advisory about 5 critical security vulnerabilities affecting all Redis OSS/CE versions. All CVEs can lead to Remote Code Execution (RCE) if successfully exploited.

#CVE IDCVSSSeverityVulnerability TypeExploitation Conditions
1CVE-2026-234797.7HIGHUse-After-FreeAuthenticated, with permission to run blocking commands
2CVE-2026-252437.7HIGHInvalid Memory AccessAuthenticated, with permission to run RESTORE
3CVE-2026-255887.7HIGHInvalid Memory AccessAuthenticated, with RESTORE permission + RedisTimeSeries module
4CVE-2026-255897.7HIGHInvalid Memory AccessAuthenticated, with RESTORE permission + RedisBloom module
5CVE-2026-236316.1MEDIUMUse-After-FreeAuthenticated, replica with replica-read-only = disabled

Common point: All CVEs require the attacker to be authenticated to the Redis instance. CVE-2026-23631 only affects replicas with the replica-read-only disabled configuration.


AFFECTED VERSIONS

Redis OSS/CE — All versions prior to the patch

Version linePatched version (minimum)
6.2.x6.2.22
7.2.x7.2.14
7.4.x7.4.9
8.2.x8.2.6
8.4.x8.4.3
8.6.x8.6.3

Modules — Patched versions

ModuleMinimum version
RedisTimeSeries1.12.14 / 1.10.24 / 1.8.23
RedisBloom2.8.20 / 2.6.28 / 2.4.23

Redis Software (Enterprise)

VersionPatch
8.0.68.0.10-64
7.22.27.22.2-79
7.8.67.8.6-253
7.4.67.4.6-279
7.2.47.2.4-153

Redis Cloud

All Redis Cloud deployments have been automatically patched at the time of the advisory publication.


DETAILS OF EACH CVE

CVE-2026-23479

AttributeValue
TitleUse-After-Free in Unblock Client Flow
CVSS 4.07.7 (HIGH)
CWECWE-416 (Use After Free)
VectorAV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
ConditionAuthenticated attacker, with permission to execute blocking commands
ScopeAll Redis OSS/CE, Redis Software <= 8.0.6

Technical Description

When a blocked client — for example, one waiting in BLPOP — is evicted during the re-execution of the blocked command, the processCommandAndResetClient function may return an error. The current code does not handle this case correctly, leading to a pointer referencing already-freed memory (use-after-free). An attacker can exploit the UAF to execute remote code (RCE).

Indicators of Compromise

  • Redis server crash with a stack trace containing functions related to unblock client, processCommandAndResetClient
  • The redis-server process executing unidentified commands
  • Unauthorized network connections to the Redis instance

Affected Blocking Commands```

BLPOP, BRPOP, BRPOPLPUSH, BLMOVE, BLMPOP, BZPOPMIN, BZPOPMAX, BZMPOP, WAIT, WAITAOF, XREAD, XREADGROUP

root@kitploit:~
#### Remediation method (without upgrading)

**Method 1 — Block via ACL (recommended):**```bash
# Chặn toàn bộ nhóm lệnh blocking
redis-cli ACL SETUSER default -@blocking

# Hoặc chặn từng lệnh cụ thể
redis-cli ACL SETUSER default -BLPOP -BRPOP -BRPOPLPUSH -BLMOVE -BLMPOP \
                              -BZPOPMIN -BZPOPMAX -BZMPOP \
                              -WAIT -WAITAOF \
                              -XREAD -XREADGROUP

# Lưu ACL
redis-cli ACL SAVE

Method 2 — Disabling via rename-command (requires Redis restart):```bash

Thêm vào redis.conf:

rename-command BLPOP "" rename-command BRPOP "" rename-command BRPOPLPUSH "" rename-command BLMOVE "" rename-command BLMPOP "" rename-command BZPOPMIN "" rename-command BZPOPMAX "" rename-command BZMPOP "" rename-command WAIT "" rename-command WAITAOF "" rename-command XREAD "" rename-command XREADGROUP ""

root@kitploit:~
**Method 3 — Enable protected-mode and limit connections:**```bash
redis-cli CONFIG SET protected-mode yes
# Trong redis.conf:
protected-mode yes
bind 127.0.0.1

CVE-2026-25243

AttributeValue
TitleInvalid Memory Access in RESTORE Command
CVSS 4.07.7 (HIGH)
CWECWE-20 (Improper Input Validation) + CWE-122 (Heap Buffer Overflow)
VectorAV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
ConditionAuthenticated attacker with RESTORE execution privileges
ScopeAll Redis OSS/CE, Redis Software <= 8.0.6

Technical Description

The vulnerability consists of 2 sub-issues:

  1. Double-free in Redis core (discovered by Emil Lerner) — RESTORE processes specially crafted serialized payloads leading to double memory release on the same pointer.
  2. Integer overflow and Out-Of-Bounds read in VectorSets (discovered by Joseph Surin) — specially crafted payloads cause integer overflow, leading to reads/writes outside the allocated memory region.

An authenticated attacker sends a specially crafted RESTORE payload to exploit the above flaws, potentially leading to RCE in the context of the redis-server process.

Indicators of Compromise

  • Unusual Redis server crash
  • Changes to system files (especially in the directory containing Redis RDB/AOF/config)
  • Unauthorized network connections to/from the Redis instance
  • Modified Redis configuration file

Mitigation Methods (without upgrading)

Method 1 — Block RESTORE via ACL (recommended):```bash

Chặn lệnh RESTORE

redis-cli ACL SETUSER default -restore

Hoặc chặn toàn bộ nhóm lệnh nguy hiểm

redis-cli ACL SETUSER default -@dangerous

redis-cli ACL SAVE

root@kitploit:~
**Method 2 — Disable RESTORE (requires Redis restart):**```bash
# Thêm vào redis.conf:
rename-command RESTORE ""

Method 3 — Create a dedicated user ACL for the application:```bash

Tao user cho ung dung chi voi quyen doc/ghi co ban

redis-cli ACL SETUSER app_user on >StrongPass123 ~*
+@read +@write
-@dangerous
-@admin
-@scripting
-@blocking
-restore
-debug

redis-cli ACL SAVE

root@kitploit:~
### CVE-2026-25588

| Attribute    | Value                                                             |
| ------------ | ----------------------------------------------------------------- |
| **Title**    | Invalid Memory Access in RESTORE with RedisTimeSeries Module      |
| **CVSS 4.0** | **7.7 (HIGH)**                                                    |
| **CWE**      | CWE-20 + CWE-122                                                   |
| **Vector**   | `AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`           |
| **Condition**| Authenticated + RESTORE permission + **RedisTimeSeries module loaded** |
| **Scope**    | Redis OSS/CE + RedisTimeSeries module                              |

#### Technical Description

When the `RESTORE` command is used on an instance with the **RedisTimeSeries module** loaded, a specially crafted serialized payload can trigger invalid memory access during time-series data processing. The vulnerability lies in how the RedisTimeSeries module deserializes data from the RESTORE payload.

#### Indicators of Compromise

- Redis crash with a stack trace related to the RedisTimeSeries module
- RedisTimeSeries module is loaded (`MODULE LIST` shows timeseries)
- Unexpected command execution by redis-server

#### Mitigation Methods (without upgrading)

**Method 1 — Block RESTORE via ACL:** (same as CVE-2026-25243)```bash
redis-cli ACL SETUSER default -restore
redis-cli ACL SAVE

Method 2 — Remove the RedisTimeSeries module (if not needed):```bash redis-cli MODULE UNLOAD timeseries

root@kitploit:~
Then remove the following line from `redis.conf`:```
loadmodule /path/to/redistimeseries.so

Method 3 — Upgrade only the module (without upgrading Redis):

Download the patched module version:

  • RedisTimeSeries 1.12.14 (for the 1.12 line)
  • RedisTimeSeries 1.10.24 (for the 1.10 line)
  • RedisTimeSeries 1.8.23 (for the 1.8 line)```bash

Thay the file .so cu bang phien ban moi

Sau do restart Redis hoac:

redis-cli MODULE UNLOAD timeseries redis-cli MODULE LOAD /path/to/new/redistimeseries.so

root@kitploit:~
---

### CVE-2026-25589

| Attribute    | Value                                                                        |
| ------------- | ----------------------------------------------------------------------------- |
| **Title**     | Invalid Memory Access in RESTORE with RedisBloom Module                       |
| **CVSS 4.0**  | **7.7 (HIGH)**                                                                |
| **CWE**       | CWE-20 + CWE-122 + CWE-787 (Out-of-Bounds Write) + CWE-190 (Integer Overflow) |
| **Vector**    | `AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`                      |
| **Condition** | Authenticated + RESTORE permission + **RedisBloom module loaded**             |
| **Scope**     | Redis OSS/CE + RedisBloom module                                              |

#### Technical Description

The vulnerability includes multiple sub-issues in the RedisBloom module when processing RESTORE payloads:

1. **Out-Of-Bounds read/write** (Daniel Firer) — reading/writing outside the allocated memory range
2. **Integer overflow, heap buffer overflow, and OOB read/write** (Joseph Surin) — integer overflow leading to heap buffer overflow

When the RedisBloom module is loaded, an attacker can send a specially crafted RESTORE payload to exploit the above errors during the deserialization of Bloom filter, Cuckoo filter, Count-Min Sketch, or Top-K data.

#### Indicators of Compromise

- Redis crash with a stack trace related to the RedisBloom module
- RedisBloom module is loaded (`MODULE LIST` shows bf/bloom)
- Data in Bloom filters is corrupted or abnormally altered

#### Mitigation (without upgrading)

**Method 1 — Block RESTORE via ACL:** (same as CVE-2026-25243)```bash
redis-cli ACL SETUSER default -restore
redis-cli ACL SAVE

Method 2 — Remove the RedisBloom module (if not needed):```bash redis-cli MODULE UNLOAD bf

root@kitploit:~
Then remove the following line from `redis.conf`:```
loadmodule /path/to/redisbloom.so

Method 3 — Upgrade only the module (without upgrading Redis):

Download the patched module version:

  • RedisBloom 2.8.20 (for the 2.8 line)
  • RedisBloom 2.6.28 (for the 2.6 line)
  • RedisBloom 2.4.23 (for the 2.4 line)```bash redis-cli MODULE UNLOAD bf redis-cli MODULE LOAD /path/to/new/redisbloom.so
root@kitploit:~
---

### CVE-2026-23631

| Attribute    | Value                                                           |
| ------------ | --------------------------------------------------------------- |
| **Title**    | Lua Use-After-Free via Master-Replica Synchronization           |
| **CVSS 4.0** | **6.1 (MEDIUM)**                                                |
| **CWE**      | CWE-416 (Use After Free)                                        |
| **Vector**   | `AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N`        |
| **Condition**| Authenticated + **replica** with `replica-read-only` = **disabled** |
| **Scope**    | All Redis OSS/CE with Lua scripting, ONLY on replica            |
| **Codename** | "DarkReplica" (Yoni Shiraz, Wiz Zeroday Cloud)                  |

#### Technical Description

An authenticated attacker can exploit the master-replica synchronization mechanism to send specially crafted Lua scripts, triggering a use-after-free in the Lua engine on the replica.

**Critical condition:** The bug **only affects replicas** configured with `replica-read-only disabled` (i.e., a writable replica). This is **not** the default configuration — the default `replica-read-only` = `yes`.

If the replica is configured in read-only mode (default), the instance is **not affected**.

#### Indicators of Compromise

- Redis crash on the replica with a stack trace from the Lua engine
- `replica-read-only` configuration = `no` on the replica
- Execution of unknown commands on the replica
- Unauthorized network connections to the replica

#### Mitigation (without upgrading)

**Option 1 — Enable replica-read-only (recommended, this is the default):**```bash
# Runtime
redis-cli CONFIG SET replica-read-only yes

# Trong redis.conf:
replica-read-only yes

Method 2 — Block Lua scripting via ACL:```bash redis-cli ACL SETUSER default -@scripting redis-cli ACL SETUSER default -eval -evalsha -script -function -fcall -fcall_ro redis-cli ACL SAVE

root@kitploit:~
**Method 3 — Disable Lua commands (requires Redis restart):**```bash
# Thêm vào redis.conf:
rename-command EVAL ""
rename-command EVALSHA ""
rename-command SCRIPT ""
rename-command FUNCTION ""
rename-command FCALL ""
rename-command FCALL_RO ""

SCRIPT USAGE GUIDE

How It Works

  • No parameters → displays usage instructions (help)
  • --scan → diagnoses and checks all CVEs
  • --fix-... → applies remediation measures for a specific CVE``` $ ./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh → hiển thị banner + HELP + thoát
root@kitploit:~
### System Requirements

- **Operating System:** Linux (Ubuntu, Debian, CentOS, RHEL, ...)
- **Tool:** `redis-cli` (usually included in the `redis-tools` or `redis` package)
- **Permissions:** Read/write access to the `redis.conf` file (for fixing)
- **Connection:** Network access to the Redis instance to be checked

### Installing redis-cli (if not already available)```bash
# Ubuntu/Debian
sudo apt update && sudo apt install -y redis-tools

# CentOS/RHEL 7
sudo yum install -y redis

# CentOS/RHEL 8+/Fedora
sudo dnf install -y redis

# Hoặc từ source
wget https://download.redis.io/releases/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
cd redis-stable && make redis-cli
sudo cp src/redis-cli /usr/local/bin/

Usage

1. View help```bash

Cấp quyền thực thi

chmod +x CVE-2026-25589-25588-25243-23631-23479-REDIS.sh

Chạy không tham số → hiển thị help

./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh

Hoặc tường minh

./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --help

root@kitploit:~
#### 2. Full CVE scan (diagnostic)```bash
# Local Redis
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan

# Redis từ xa
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan \
    -H 192.168.1.100 -p 6379 -a "your_password"

# Với ACL user
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan \
    -H 10.0.0.50 -p 6380 -u admin -a "admin_password"

# Qua Unix socket
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan \
    -s /var/run/redis/redis-server.sock

# Kèm xuất báo cáo
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan \
    -o redis_cve_report_$(date +%Y%m%d).txt

3. Fixing each CVE individually```bash

Fix tung CVE cu the

./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-cve-23479 ./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-cve-25243 -H 10.0.0.1 -a mypassword ./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-cve-25588 ./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-cve-25589 ./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-cve-23631 -c /etc/redis/redis.conf

root@kitploit:~
#### 4. Group Quick Fix (recommended)```bash
# Chan RESTORE → bao ve 3/5 CVE (25243 + 25588 + 25589)
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-restore

# Chan blocking commands → bao ve CVE-2026-23479
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-blocking

# Chan Lua + bat replica-read-only → bao ve CVE-2026-23631
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-lua

5. Full remediation```bash

Fix tat ca CVE (co backup config)

./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-all

Fix all voi file config rieng

./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-all
-c /etc/redis/redis.conf

Fix all khong backup (khong khuyen nghi)

./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-all --no-backup

Fix all Redis tu xa

./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --fix-all
-H 10.0.0.1 -p 6379 -a mypassword

root@kitploit:~
### Full Parameter Table

#### Action Parameters (ACTION) — Required

| Parameter        | Function                                    | Number of CVEs Protected |
| ---------------- | ------------------------------------------- | ------------------------ |
| *(no parameter)* | Displays usage instructions                 | —                        |
| `--scan`         | Full diagnostic scan of all 5 CVEs          | —                        |
| `--fix-all`      | Fixes all CVEs                              | **5/5**                  |
| `--fix-restore`  | **[Fast]** Only blocks the RESTORE command  | **3/5** (25243, 25588, 25589) |
| `--fix-blocking` | **[Fast]** Only blocks blocking commands    | **1/5** (23479)          |
| `--fix-lua`      | **[Fast]** Blocks Lua + enables replica-read-only | **1/5** (23631)          |
| `--fix-cve-23479`| Fixes CVE-2026-23479                        | 1/5                      |
| `--fix-cve-25243`| Fixes CVE-2026-25243                        | 1/5                      |
| `--fix-cve-25588`| Fixes CVE-2026-25588                        | 1/5                      |
| `--fix-cve-25589`| Fixes CVE-2026-25589                        | 1/5                      |
| `--fix-cve-23631`| Fixes CVE-2026-23631                        | 1/5                      |

#### Connection Parameters

| Parameter            | Description              | Default     |
| -------------------- | ------------------------ | ----------- |
| `-H, --host HOST`    | Redis host address       | `127.0.0.1` |
| `-p, --port PORT`    | Redis port               | `6379`      |
| `-a, --pass PASS`    | Redis password           | *(empty)*   |
| `-u, --user USER`    | ACL username             | `default`   |
| `-s, --socket PATH`  | Unix socket path         | *(empty)*   |

#### Additional Parameters

| Parameter            | Description                              | Default                 |
| -------------------- | ---------------------------------------- | ----------------------- |
| `-h, --help`         | Displays help                            | —                       |
| `-c, --config FILE`  | Path to redis.conf                       | `/etc/redis/redis.conf` |
| `-o, --output FILE`  | Writes report to file (only with `--scan`) | *(empty)*             |
| `--redis-cli PATH`   | Path to redis-cli binary                 | `redis-cli` (from PATH) |
| `--no-backup`        | Do not back up config before modifying   | `false`                 |

### Exit Codes

| Code | Meaning                                                |
| ---- | ------------------------------------------------------ |
| `0`  | Success — no CVEs detected or fix completed            |
| `1`  | Error: redis-cli not found or unable to connect        |
| `2`  | `--scan` detected at least 1 CVE — remediation needed  |

### Scan Output (`--scan`)```
╔══════════════════════════════════════════════════════════════════════╗
║    REDIS CVE SCANNER & MITIGATION TOOL                               ║
╚══════════════════════════════════════════════════════════════════════╝

[*] THONG TIN REDIS INSTANCE
  Host:Port     : 127.0.0.1:6379
  Version       : 7.2.5
  Mode          : standalone
  Role          : master
  Modules       : timeseries bf

═══════════════════════════════════════════════════════════════════════
  [1/5] CVE-2026-23479 - Use-after-free trong Unblock Client Flow
        CVSS 7.7 (HIGH) | RCE
═══════════════════════════════════════════════════════════════════════
[✗] CO KHA NANG BI ANH HUONG - Redis 7.2.5 (can >= 7.2.14)

  ... (CVE 2-5 tuong tu)

╔══════════════════════════════════════════════════════════════════════╗
║                         TOM TAT KET QUA                              ║
╚══════════════════════════════════════════════════════════════════════╝
  [✗] CVE-2026-23479 - VULNERABLE
  [✗] CVE-2026-25243 - VULNERABLE
  [✗] CVE-2026-25588 - VULNERABLE
  [✗] CVE-2026-25589 - VULNERABLE
  [✓] CVE-2026-23631 - OK

  Ket qua: 1 PASS / 4 VULNERABLE

═══════════════════════════════════════════════════════════════════════
  [!] Phat hien 4 CVE. Su dung cac tuy chon --fix-... de khac phuc.
  VD: ./script.sh --fix-restore    # Chan RESTORE (3 CVE)
  VD: ./script.sh --fix-blocking   # Chan blocking (1 CVE)
  VD: ./script.sh --fix-lua        # Chan Lua (1 CVE)
  VD: ./script.sh --fix-all        # Khac phuc toan bo
═══════════════════════════════════════════════════════════════════════

Output when fixing (--fix-restore)```

╔══════════════════════════════════════════════════════════════════════╗ ║ REDIS CVE SCANNER & MITIGATION TOOL ║ ╚══════════════════════════════════════════════════════════════════════╝

[*] THONG TIN REDIS INSTANCE Host:Port : 127.0.0.1:6379 Version : 7.2.5 ...

╔══════════════════════════════════════════════════════════════════════╗ ║ FIX NHANH: Chan RESTORE (CVE-2026-25243 + 25588 + 25589) ║ ╚══════════════════════════════════════════════════════════════════════╝ Bao ve 3/5 CVE chi voi 1 lenh chan RESTORE

[+] Da backup redis.conf toi: /etc/redis/redis.conf.cve-backup-20260508_120000 [*] Chan RESTORE qua ACL (khong can restart) => ACL SETUSER default -restore ... OK => ACL SAVE ... OK

[*] rename-command RESTORE "" (can restart) => Vo hieu hoa: rename-command RESTORE "" [!] CAN RESTART REDIS de rename-command co hieu luc

[✓] Da chan RESTORE. Cac CVE duoc bao ve:

  • CVE-2026-25243 (RESTORE double-free/OOB)
  • CVE-2026-25588 (RESTORE + RedisTimeSeries)
  • CVE-2026-25589 (RESTORE + RedisBloom)
root@kitploit:~
---

## GENERAL REMEDIATION METHODS

### Method 1: ACL (Redis >= 6.0) — RECOMMENDED

This is the **safest and most flexible method**, requiring no Redis restart.```bash
# Tao ACL user an toan cho ung dung
redis-cli ACL SETUSER app_user on >StrongPassword123 ~* \
    +@read \           # Quyen doc du lieu
    +@write \          # Quyen ghi du lieu
    -@dangerous \      # CHAN tat ca lenh nguy hiem (gồm RESTORE)
    -@admin \          # CHAN lenh quan tri
    -@scripting \      # CHAN Lua scripting
    -@blocking \       # CHAN blocking commands
    -@keyspace \       # CHAN keyspace notifications
    -@pubsub           # CHAN pub/sub (neu khong dung)

# Vo hieu hoa default user
redis-cli ACL SETUSER default off

# Luu ACL vinh vien
redis-cli ACL SAVE

Method 2: rename-command — Requires Redis restart

Add the following lines to redis.conf:```conf

Vo hieu hoa RESTORE (CVE-2026-25243, 25588, 25589)

rename-command RESTORE ""

Vo hieu hoa blocking commands (CVE-2026-23479)

rename-command BLPOP "" rename-command BRPOP "" rename-command BRPOPLPUSH "" rename-command BLMOVE "" rename-command BLMPOP "" rename-command BZPOPMIN "" rename-command BZPOPMAX "" rename-command BZMPOP "" rename-command XREAD "" rename-command XREADGROUP ""

Vo hieu hoa Lua commands (CVE-2026-23631)

rename-command EVAL "" rename-command EVALSHA "" rename-command SCRIPT "" rename-command FUNCTION "" rename-command FCALL "" rename-command FCALL_RO ""

root@kitploit:~
Then restart Redis:```bash
sudo systemctl restart redis-server
# hoặc
sudo service redis-server restart

Method 3: Network Configuration + Firewall```bash

Trong redis.conf:

protected-mode yes bind 127.0.0.1 192.168.1.10 # Chi lang nghe IP tin cay

iptables — chi cho phep IP noi bo

iptables -A INPUT -p tcp --dport 6379 -s 127.0.0.1 -j ACCEPT iptables -A INPUT -p tcp --dport 6379 -s 10.0.0.0/8 -j ACCEPT iptables -A INPUT -p tcp --dport 6379 -j DROP

Luu iptables

iptables-save > /etc/iptables/rules.v4

root@kitploit:~
### Method 4: Running Redis with minimal privileges```bash
# Tao user redis khong co shell
sudo useradd -r -s /bin/false redis

# Chown thu muc Redis
sudo chown -R redis:redis /var/lib/redis
sudo chown -R redis:redis /etc/redis

# Chay Redis duoi user redis
sudo -u redis redis-server /etc/redis/redis.conf

Method 5: Remove unnecessary modules```bash

Kiem tra module dang nap

redis-cli MODULE LIST

Go bo module khong can thiet

redis-cli MODULE UNLOAD timeseries # CVE-2026-25588 redis-cli MODULE UNLOAD bf # CVE-2026-25589

Xoa loadmodule khoi redis.conf

Tim va xoa dong:

loadmodule /path/to/redistimeseries.so

loadmodule /path/to/redisbloom.so

root@kitploit:~
---

## RISK ASSESSMENT — INTERNAL REDIS SYSTEM / SENTINEL

This section applies to **Redis Sentinel** clusters or standalone Redis instances running on an internal network, protected by a firewall (Fortinet, iptables, etc.) and **with no direct Internet connectivity**.

### Summary

| Current protection level           | Risk mitigation?                                             | Upgrade needed?                         |
| ---------------------------------- | ------------------------------------------------------------ | --------------------------------------- |
| No Internet access                 | **Yes** — eliminates external attackers                       | Not urgent                              |
| Fortinet Firewall (with IPS/DPI)   | **Yes** — filters source IPs, IPS can detect anomalous payloads | Not urgent                              |
| iptables (source IP restrictions)  | **Yes** — only allowed IPs can connect to the Redis port      | Not urgent                              |
| **Combination of all three measures** | **Reduces exploitation probability to very low**              | **Not urgent, but a plan is advisable** |

### Key point: Why is a firewall not enough?

All 5 CVEs share a common trait: the attacker must **already be authenticated** to Redis (PR:L — Privileges Required: Low in the CVSS vector). A firewall blocks connections from unauthorized IPs, but it **does not protect** against the following threats:

| Threat                                                                                                            | Likelihood                | Impact if exploited                                                          |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------- | ---------------------------------------------------------------------------- |
| **Malicious insider** — has internal network access + knows the Redis password                                    | Low but cannot be ruled out | **RCE** on the Redis server, privilege escalation, data theft                |
| **Compromised internal host (Lateral Movement)** — attacker breaches any machine on the network, then targets Redis | Medium                    | All Redis data stolen/altered/deleted; attacker may install a backdoor        |
| **Firewall misconfiguration** — accidentally exposing the Redis port externally due to an incorrect rule change    | Low                       | Equivalent to direct Internet exposure                                        |
| **Supply Chain / Third-Party** — partners or vendors with VPN access to the internal network                       | Low                       | RCE, data exfiltration                                                        |
| **Vulnerability in the firewall/network itself** — attacker bypasses the firewall through another flaw            | Very low                  | The entire internal system is affected                                        |

### Quantitative risk analysis```
Rủi ro = Xác suất khai thác × Hậu quả

Với firewall + air-gap:
  = (RẤT THẤP: 0.5% - 2%/năm) × (NGHIÊM TRỌNG: RCE toàn hệ thống, mất toàn bộ dữ liệu)
  = RỦI RO TRUNG BÌNH — vẫn đáng quan tâm

Sentinel Cluster-Specific Threat Model

The Redis Sentinel cluster adds its own risks:

Sentinel Attack VectorDescriptionRelated CVEs
Sentinel takeover — attacker compromises a Sentinel node, then fails over to a malicious replicaSentinel communicates over a dedicated port (usually 26379); if not separately protectedCVE-2026-23631 (if the replica has replica-read-only no)
Replica promotion — a compromised replica is promoted to masterData across the entire cluster is alteredAll RESTORE CVEs (25243, 25588, 25589)
Master-replica sync — attacker intercepts the sync streamData is stolen during the sync processCVE-2026-23631

Recommendations by Priority

PriorityActionExecution TimeDowntime Required?
P0 — ImmediateRun the check script on all nodes (master + replica + sentinel): ./CVE-...sh -H <ip> -p <port> -a <pass>2-5 min / nodeNo
P0 — ImmediateCheck replica-read-only yes on all replicas: redis-cli CONFIG GET replica-read-only1 min / nodeNo
P1 — Within the weekBlock RESTORE via ACL (no restart needed): redis-cli ACL SETUSER default -restore; redis-cli ACL SAVE2 min / nodeNo
P1 — Within the weekBlock @blocking commands via ACL (CVE-2026-23479)2 min / nodeNo
P1 — Within the weekBlock @scripting commands via ACL if Lua is not used (CVE-2026-23631)2 min / nodeNo
P2 — Next maintenance windowAdd rename-command RESTORE "", rename-command EVAL "", ... to redis.conf10 min (with restart)Yes (Redis restart)
P2 — Next maintenance windowUpgrade Redis to a patched version (6.2.22, 7.2.14, 7.4.9, 8.2.6, 8.4.3, 8.6.3)30-60 min / clusterYes (full cluster restart)

Example: Protecting an Entire Sentinel Cluster with ACL (no downtime)```bash

============================================

Chay tren TUNG node Redis (master + replica)

============================================

1. Tao ACL user an toan cho ung dung

redis-cli -h <node_ip> -p 6379 -a ACL SETUSER app_user on >StrongPass123 ~*
+@read +@write
-@dangerous -@admin -@scripting -@blocking
-restore -debug

2. Vo hieu hoa default user

redis-cli -h <node_ip> -p 6379 -a ACL SETUSER default off

3. Luu ACL

redis-cli -h <node_ip> -p 6379 -a ACL SAVE

4. Kiem tra lai

redis-cli -h <node_ip> -p 6379 -a --user app_user --pass StrongPass123 PING

root@kitploit:~
Tính năng này cho phép bạn tạo ra các báo cáo chi tiết về các lỗ hổng đã được phát hiện, bao gồm cả thông tin về mức độ nghiêm trọng, cách khai thác và các biện pháp khắc phục. Báo cáo có thể được xuất ra dưới dạng HTML, PDF hoặc Markdown, giúp bạn dễ dàng chia sẻ với đồng nghiệp hoặc khách hàng.```bash
# ============================================
# Chay tren TUNG node Sentinel (port 26379)
# ============================================

# Sentinel thuong khong can RESTORE/EVAL — chan toan bo lenh nguy hiem
redis-cli -h <sentinel_ip> -p 26379 -a <sentinel_pass> ACL SETUSER default \
    -@dangerous -@admin -@scripting -@blocking -restore

redis-cli -h <sentinel_ip> -p 26379 -a <sentinel_pass> ACL SAVE

Decision flow: Do you need to upgrade right away?```

Hệ thống Redis của bạn có public-facing không? ├── CÓ → NÂNG CẤP NGAY hoặc áp dụng workaround TRONG 24H └── KHÔNG (nội bộ / air-gapped) ├── Có dùng Lua scripting (EVAL/EVALSHA)? │ ├── CÓ → CVE-2026-23631: Kiểm tra replica-read-only, chặn @scripting qua ACL │ └── KHÔNG → Rủi ro thấp hơn ├── Có dùng RedisTimeSeries hoặc RedisBloom module? │ ├── CÓ → CVE-2026-25588/25589: Chặn RESTORE qua ACL, nâng cấp module │ └── KHÔNG → Không bị ảnh hưởng bởi 25588/25589 ├── Có dùng blocking commands (BLPOP, XREAD, ...)? │ ├── CÓ → CVE-2026-23479: Chặn @blocking qua ACL hoặc rename-command │ └── KHÔNG → Chặn @blocking để an toàn (không ảnh hưởng) └── KẾT LUẬN: ├── Áp dụng ACL workaround NGAY TRONG TUẦN (không downtime) └── Lên kế hoạch nâng cấp TRONG MAINTENANCE WINDOW TIẾP THEO

root@kitploit:~
### Conclusion

> **Firewall + network isolation reduces the exploit probability to a very low level, but the impact if exploited is still full-system RCE.** With a remediation cost of nearly zero (adding a few ACL lines without requiring a restart), applying the protective measure is a beneficial decision from a risk management perspective. **No need to panic and upgrade urgently**, but **the ACL workaround should be applied this week** and an upgrade should be scheduled for the next maintenance window.

---

## ACL REFERENCE

### Important command categories

| Category     | Description                                                                     | CVE Impact                   |
| ------------ | ------------------------------------------------------------------------------- | ---------------------------- |
| `@dangerous` | Dangerous commands (including RESTORE, FLUSHDB, FLUSHALL, KEYS, SHUTDOWN, DEBUG, CONFIG) | CVE-2026-25243, 25588, 25589 |
| `@blocking`  | Blocking commands (BLPOP, BRPOP, BZPOPMIN, XREAD, WAIT, ...)                     | CVE-2026-23479               |
| `@scripting` | Lua scripting (EVAL, EVALSHA, SCRIPT, FUNCTION, FCALL)                           | CVE-2026-23631               |
| `@admin`     | Administrative commands (CONFIG, ACL, CLIENT, CLUSTER, MONITOR, SHUTDOWN, ...)   | General protection           |
| `@keyspace`  | Keyspace-related commands (KEYS, SCAN, FLUSHDB, FLUSHALL, ...)                   | General protection           |
| `@read`      | Data read commands (GET, HGET, LRANGE, SMEMBERS, ZRANGE, ...)                    | Safe                         |
| `@write`     | Data write commands (SET, HSET, LPUSH, SADD, ZADD, ...)                          | Safe                         |

### Example of a complete ACL configuration```bash
# 1. Tao admin user (day du quyen)
redis-cli ACL SETUSER admin on >AdminPass123 ~* +@all

# 2. Tao app user (quyen gioi han)
redis-cli ACL SETUSER app on >AppPass123 ~* \
    +@read \
    +@write \
    -@dangerous \
    -@admin \
    -@scripting \
    -@blocking \
    -restore \
    -debug

# 3. Tao readonly user (chi doc)
redis-cli ACL SETUSER reader on >ReaderPass123 ~* \
    +@read \
    -@dangerous \
    -@admin \
    -@scripting

# 4. Vo hieu hoa default user
redis-cli ACL SETUSER default off

# 5. Luu ACL
redis-cli ACL SAVE

# 6. Kiem tra ACL
redis-cli ACL LIST

Effective ACL Checking```bash

Liet ke tat ca ACL rules

redis-cli ACL LIST

Kiem tra quyen cua mot user

redis-cli ACL GETUSER app

Kiem tra user hien tai

redis-cli ACL WHOAMI

Xem log vi pham ACL

redis-cli ACL LOG

root@kitploit:~
---

## PERIODIC TESTING PROCEDURE

### 1. One-time testing (ad-hoc)```bash
./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan \
    -H <redis_host> -p <port> -a <password> \
    -o report_$(date +%Y%m%d_%H%M%S).txt

2. Batch testing multiple Redis instances

Create the redis_hosts.txt file:```

Format: host:port:password:user

10.0.0.1:6379:pass1:default 10.0.0.2:6379:pass2:default 10.0.0.3:6380:pass3:admin

root@kitploit:~
Batch checking script:```bash
#!/bin/bash
# File: batch_check.sh

BATCH_RESULT="batch_result_$(date +%Y%m%d_%H%M%S).txt"

while IFS=':' read -r host port pass user; do
    [[ "$host" =~ ^#.* ]] && continue  # Bo qua comment
    [[ -z "$host" ]] && continue        # Bo qua dong trong

    echo "============================================" | tee -a "$BATCH_RESULT"
    echo "Kiem tra: $host:$port" | tee -a "$BATCH_RESULT"
    echo "============================================" | tee -a "$BATCH_RESULT"

    ./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan \
        -H "$host" -p "${port:-6379}" \
        -a "${pass:-}" -u "${user:-default}" \
        2>&1 | tee -a "$BATCH_RESULT"

    echo "" | tee -a "$BATCH_RESULT"
done < redis_hosts.txt

echo "Bao cao tong hop: $BATCH_RESULT"

3. Integrating into cron (daily checks)```bash

Them vao crontab (chay hang ngay luc 7:00 AM)

0 7 * * * /opt/scripts/CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan
-H 127.0.0.1 -p 6379 -a mypassword
-o /var/log/redis/cve_report_$(date +%Y%m%d).txt
> /dev/null 2>&1

root@kitploit:~
### 4. Integration into CI/CD pipeline```yaml
# GitLab CI example
redis-security-scan:
  stage: security
  image: redis:7-alpine
  script:
    - chmod +x CVE-2026-25589-25588-25243-23631-23479-REDIS.sh
    - ./CVE-2026-25589-25588-25243-23631-23479-REDIS.sh --scan \
        -H $REDIS_HOST -p $REDIS_PORT -a $REDIS_PASS \
        -o cve_report.txt
  artifacts:
    paths:
      - cve_report.txt
    when: always
  allow_failure: true

FREQUENTLY ASKED QUESTIONS (FAQ)

Q: Do I need to restart Redis after applying --fix-...?

A: Yes, for rename-command changes — they only take effect after restarting Redis. Changes via CONFIG SET (such as protected-mode, replica-read-only) take effect immediately. Changes via ACL SETUSER + ACL SAVE take effect immediately, no restart required. If you only use ACL (--fix-restore, --fix-blocking, --fix-lua), you do not need to restart. The script always applies both ACL (runtime) and rename-command (requires restart) simultaneously for multi-layer protection.

Q: Does blocking RESTORE affect normal operations?

A: The RESTORE command is typically only used in the following cases:

  • Restoring data from backups
  • Migrating data between instances
  • Custom data synchronization

If your application does not use RESTORE, blocking this command is safe. If it does, create a dedicated ACL user with RESTORE permission and use it only for administrative purposes.

Q: I am using Redis < 6.0, ACL is not available. What should I do?

A: With Redis < 6.0, you can only use rename-command to disable commands. The steps:

  1. Add rename-command RESTORE "" to redis.conf
  2. Add rename-command entries for blocking commands
  3. Enable protected-mode yes
  4. Set requirepass with a strong password
  5. Restrict connections via firewall
  6. Restart Redis

Q: How do I know if the RedisTimeSeries/RedisBloom module is loaded?

A: Run the command:```bash redis-cli MODULE LIST

root@kitploit:~
The output will display the list of loaded modules along with their versions. If `timeseries` or `bf` is not visible, the module is not loaded.

### Q: Are `--fix-all` / `--fix-restore` / `--fix-...` safe for production?

**A:** The fix commands perform safe changes:

- Backs up redis.conf before modifying (unless using `--no-backup`)
- **ACL** (`-restore`, `-@blocking`, `-@scripting`): takes effect immediately, no downtime, easy to revert
- **rename-command**: requires a Redis restart to take effect
- **CONFIG SET**: runtime only, lost on restart if not written to redis.conf

Recommendation: For production, prioritize using `--fix-restore`, `--fix-blocking`, `--fix-lua` first (ACL only, no restart needed). Then schedule a maintenance window to restart with `rename-command`.

### Q: How do I roll back changes made by `--fix-...`?

**A:**

1. If backed up: copy the backup file over redis.conf, then restart Redis
2. If using `CONFIG SET`: restarting Redis will restore configuration from the file
3. If using `ACL SETUSER`: use `ACL SETUSER <user> +<cmd>` to restore permissions

### Q: Should I upgrade Redis?

**A:** **Yes, if possible.** Upgrading to a patched version is the most thorough solution. This script is intended for cases where:

- You cannot upgrade immediately due to application constraints
- You need time to test the new version
- You need temporary protection while waiting for a maintenance window

### Q: Redis runs internally, not exposed to the Internet, protected by a firewall — do I still need to upgrade?

**A:** **No urgent upgrade needed**, but **you should apply the workaround and have an upgrade plan** because:

- A firewall only reduces the **probability** of an attack, it does not completely eliminate the risk
- Attackers from within the internal network (malicious employees, compromised machines, lateral movement) can still exploit it
- The consequence if exploited is **system-wide RCE** — the highest severity level
- **The workaround cost is very low**: adding the ACL `-restore -@blocking -@scripting` takes 2 minutes, no downtime

**Recommended roadmap:**

1. **This week:** Apply the ACL workaround (no downtime)
2. **Next maintenance window:** Upgrade Redis + add `rename-command`

See details at [Risk assessment — Internal Redis / Sentinel system](#đánh-giá-rủi-ro--hệ-thống-redis-nội-bộ--sentinel).

---

## REFERENCES

- [Official Redis Security Advisory](https://redis.io/blog/security-advisory-cve202623479-cve202625243-cve-2026-25588-cve202625589-cve-2026-23631/)
- [GitHub Advisory — CVE-2026-25243 (RESTORE RCE)](https://github.com/redis/redis/security/advisories/GHSA-c8h9-259x-jff4)
- [GitHub Advisory — CVE-2026-23631 (Lua UAF)](https://github.com/redis/redis/security/advisories/GHSA-8ghh-qpmp-7826)
- [Redis ACL Documentation](https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/)
- [Redis rename-command Documentation](https://redis.io/docs/latest/operate/oss_and_stack/management/security/#disable-specific-commands)
- [NVD — CVE-2026-25243](https://nvd.nist.gov/vuln/detail/CVE-2026-25243)
- [NVD — CVE-2026-25588](https://nvd.nist.gov/vuln/detail/CVE-2026-25588)
- [OpenCVE — CVE-2026-23479](https://app.opencve.io/cve/CVE-2026-23479)
- [Tenable — CVE-2026-23631](https://www.tenable.com/cve/CVE-2026-23631)

---

> **Disclaimer:** This document is compiled based on public information from the Redis security advisory and NVD sources. Users are responsible for verifying and confirming remediation measures appropriate to their environment before applying them.
Download Tool