Skip to main content
Mallory
MediumPublic exploit

Redis Lua Use-After-Free in Master-Replica Synchronization

IdentifiersCVE-2026-23631CWE-416· Use After Free

CVE-2026-23631 is a use-after-free vulnerability in Redis affecting all versions of redis-server with Lua scripting. According to the provided advisory content, an authenticated attacker can abuse the master-replica synchronization mechanism to trigger the flaw on replica instances where replica-read-only is disabled or can be disabled. The issue is described as a Lua-related use-after-free and may result in remote code execution. The vulnerability is specific to replica configurations exposed to write-capable or potentially write-capable replication behavior, rather than all Redis deployments universally.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation may allow remote code execution in the context of the Redis server process on affected replica deployments. As with Redis server code execution, this can plausibly enable full compromise of the Redis instance, unauthorized command execution, access to in-memory data handled by Redis, service instability or crashes, and potentially broader host compromise depending on the privileges of the redis-server process and surrounding environment.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, prevent untrusted or unnecessary users from executing Lua scripts and avoid using replicas where replica-read-only is disabled. Additional hardening measures from the advisory include restricting network access to trusted sources, enforcing strong authentication, avoiding unauthenticated access, enabling protected-mode where applicable, and limiting permissions so only trusted identities can execute risky commands.

Remediation

Patch, then assume compromise.

Upgrade Redis to a fixed release. The provided content states the issue is patched in Redis OSS/CE versions 6.2.22, 7.2.14, 7.4.9, 8.2.6, 8.4.3, and 8.6.3, and specifically notes version 8.6.3 as patched. For Redis Software, the content states fixed builds are 8.0.10-64, 7.22.2-79, 7.8.6-253, 7.4.6-279, and 7.2.4-153. Apply the vendor-provided updates to all affected self-managed deployments.
PUBLIC EXPLOITS

Exploits

1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos (2 hidden).

VALID 1 / 3 TOTALView more in app
DarkReplicaMaturityPoCVerified exploit

DarkReplica is a standalone Python exploit for CVE-2026-23631, described as a Redis post-auth RCE. The repository is not a generic framework module; it is a purpose-built exploit package with a CLI entry point in `dark_replica/__main__.py`, core exploitation logic in `dark_replica/exploit.py`, a minimal fake Redis master implementation under `dark_replica/master_server/`, Lua staging resources under `dark_replica/resources/lua/`, and helper code for crafting Redis RDB payloads and modeling Lua internal structures. Operationally, the exploit connects to a target Redis server using redis-py, optionally authenticates, flushes existing functions/scripts, and then prepares a multi-stage attack. It starts an attacker-controlled TCP server that impersonates a Redis master. The target is forced to replicate from this fake master using `SLAVEOF`, and the fake master handles `PING`, `REPLCONF`, and `PSYNC/SYNC`, replying with `FULLRESYNC` and a crafted RDB payload. That RDB payload contains staged Lua/function content used later in the exploit chain. The Lua stages are central to the exploit. `slow_function.lua` registers a function (`scam` in library `hoax`) that creates coroutine activity, enters an infinite loop to block execution, and manipulates bytecode layout to support the use-after-free trigger. `stage1.lua` performs heap spraying and controlled allocations, builds fake Lua tables/stack objects, stores the operator command payload in memory, and returns useful addresses. `stage2.lua` sprays serialized fake `lua_State` and bytecode objects and registers a function to pin them against garbage collection. `stage3.lua` implements arbitrary read/write primitives using corrupted Lua table metadata, derives the Redis base from `os.clock`, resolves libc via `umask@got.plt`, computes `system`, forges a fake `global_State`, and corrupts a coroutine state so that resuming it reaches a path that invokes `system(command_payload)`. The exploit depends on target-specific symbol offsets supplied in JSON5 format. Example offsets are included for the official `redis:latest` Docker image and Redis 8.6.2. The helper script `extract_offsets.sh` extracts required offsets (`os_clock`, `umask@got.plt`, `umask`, `system`) from Redis and libc ELF files using `readelf`. This indicates the exploit is practical but environment-sensitive rather than fully universal. Repository structure is coherent and purposeful: Python code orchestrates the attack, Lua templates implement memory corruption stages, `rdb/writer.py` builds a valid Redis RDB with function records, and `master_server/client.py` emulates enough of the replication protocol to deliver the malicious payload. Overall, this is a real exploit repository implementing post-auth network-based RCE against vulnerable Redis instances, with an operator-provided command payload and a custom fake-master delivery mechanism.

yoyoshDisclosed May 7, 2026pythonluanetworkweb
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
RedisRedisapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity11

Community discussion across Reddit, Mastodon, and other social sources.