Skip to navigation

Threat reportVulnerabilityTL-2026-0713

Redis DarkReplica (CVE-2026-23631) — Post-Auth RCE via Lua Functions-Engine Use-After-Free During Master-Replica Sync

highPATCHED

DarkReplica (CVE-2026-23631) is a post-authentication remote code execution flaw in Redis. An authenticated attacker issues SLAVEOF/REPLICAOF to make a target instance replicate an attacker-controlled rogue master; during sync the replica loads a new Lua function context from the incoming RDB while a paused (yielded) Lua function is allowed to resume on a now-freed lua_State, producing a use-after-free (CWE-416) that researchers chained into read/write primitives and full RCE on the host.

Key facts

IdentifiersTL-2026-0713, CVE-2026-23631
Also known asDarkReplica, GHSA-8ghh-qpmp-7826
SeverityHIGH
CVSS8.1 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H)
Exploitation statusPublic proof-of-concept exploit for a linked CVE
EPSSCVE-2026-23631: 2.8% (86.0th percentile)
Affected productsRedis redis-server
Weaknesses (CWE)CWE-416
ToolsAttacker-controlled rogue Redis master serving malicious RDB
MITRE ATT&CK techniquesT1059 Command and Scripting Interpreter, T1068 Exploitation for Privilege Escalation, T1082 System Information Discovery, T1106 Native API, T1110 Brute Force, T1190 Exploit Public-Facing Application, T1203 Exploitation for Client Execution, T1210 Exploitation of Remote Services, T1211 Exploitation for Stealth, T1565 Data Manipulation, T1595 Active Scanning, T1608 Stage Capabilities
MotivationUNKNOWN
Target sectorstechnology, financial, e-commerce, cloud, saas, gaming, telecommunications
Target regionsGlobal
Detection rules9 (1 shown free)
Sources5 cited sources

Detection coverage

As of 2026-06-08, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-0713 across Splunk SPL, Microsoft KQL and Sigma, covering 12 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: Redis Replica Pointed at External Rogue Master with read-only Disabled — DarkReplica Exploitation

Detects the DarkReplica (CVE-2026-23631) initial exploitation surface: an authenticated REPLICAOF/SLAVEOF reconfiguring a Redis instance to replicate from a non-RFC1918 (external) master, correlated with 'CONFIG SET replica-read-only no' which is the precondition that makes the Lua lua_State use-after-free reachable.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1190, T1059.006
  • Data sources: redis_command_logs, redis_audit
  • Severity: high
  • Confidence: high

Splunk SPL

index=redis sourcetype="redis:commands" (command="REPLICAOF*" OR command="SLAVEOF*" OR command="CONFIG SET replica-read-only no")
| rex field=command "(?i)(?:REPLICAOF|SLAVEOF)\s+(?<master_host>\S+)\s+(?<master_port>\d+)"
| eval external_master=if(isnotnull(master_host) AND NOT (cidrmatch("10.0.0.0/8",master_host) OR cidrmatch("172.16.0.0/12",master_host) OR cidrmatch("192.168.0.0/16",master_host) OR cidrmatch("127.0.0.0/8",master_host)),1,0)
| eval ro_disabled=if(command="CONFIG SET replica-read-only no",1,0)
| stats max(external_master) as external_master max(ro_disabled) as ro_disabled values(command) as commands values(master_host) as master_host by host
| where external_master=1 OR ro_disabled=1

Microsoft KQL

RedisCommandLogs
| where TimeGenerated > ago(24h)
| where Command has_any ("REPLICAOF", "SLAVEOF") or Command =~ "CONFIG SET replica-read-only no"
| extend MasterHost = extract(@"(?i)(?:REPLICAOF|SLAVEOF)\s+(\S+)\s+\d+", 1, Command)
| extend ExternalMaster = isnotempty(MasterHost) and not(ipv4_is_private(MasterHost))
| extend ReadOnlyDisabled = Command =~ "CONFIG SET replica-read-only no"
| where ExternalMaster or ReadOnlyDisabled
| project TimeGenerated, Host, Command, MasterHost, ExternalMaster, ReadOnlyDisabled

Sigma

title: Redis Replica Reconfigured to External Master or read-only Disabled (DarkReplica CVE-2026-23631)
id: a1f4c2e0-7b31-4d6a-9c08-1e2f3a4b5c61
status: experimental
description: Redis Replica Reconfigured to External Master or read-only Disabled (DarkReplica CVE-2026-23631) — DarkReplica CVE-2026-23631 Redis Lua functions-engine use-after-free during master-replica sync.
references:
    - https://github.com/redis/redis/security/advisories/GHSA-8ghh-qpmp-7826
    - https://nvd.nist.gov/vuln/detail/CVE-2026-23631
author: Threadlinqs Team
date: 2026/06/08
tags:
    - attack.initial-access
    - attack.execution
    - attack.t1190
    - attack.t1059.006
    - cve.2026.23631
logsource:
    product: redis
    category: application
detection:
    repl:
        command|contains:
            - 'REPLICAOF'
            - 'SLAVEOF'
    ro_disable:
        command|contains: 'CONFIG SET replica-read-only no'
    filter_internal:
        argument|cidr:
            - '10.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '127.0.0.0/8'
    condition: (repl and not filter_internal) or ro_disable
falsepositives:
    - Legitimate cross-datacenter replication to an external master configured by administrators
    - Disaster-recovery failover reconfiguration
level: high

Known false positives:

  • Legitimate cross-datacenter replication to an external master
  • Planned DR failover reconfiguration by admins

Tuning notes: Allowlist known/inventoried master IPs and the change-management windows when replication topology is modified. Alert highest when REPLICAOF to an external IP and replica-read-only disablement occur from the same client within a short window.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account)
  • Redis Outbound Full-Sync Handshake to Untrusted Master — DarkReplica Exploitation · unlock with TL Creds
  • Redis Service Account Host-Level Discovery/Egress — DarkReplica Post-Exploitation · unlock with TL Creds
  • Yielded Lua FCALL/EVAL Coinciding with Replication Engine Swap — DarkReplica UAF Trigger · unlock with TL Creds
  • Crafted dump.rdb Received During Replication Sync — DarkReplica Exploitation · unlock with TL Creds
  • Malicious [indicator] Correlated with Replication Reconfiguration — DarkReplica Post-Exploitation · unlock with TL Creds
  • Redis Host Unexpected Outbound Egress After Replication Hijack — DarkReplica Lateral Movement · unlock with TL Creds
  • redis-server Spawns Shell Child Process — DarkReplica RCE Post-Exploitation · unlock with TL Creds
  • Anomalous Redis Replication Topology to Untrusted Master — DarkReplica C2/Lateral · unlock with TL Creds

Indicators of compromise

As of 2026-06-08, Threadlinqs Intelligence tracks 12 indicators of compromise for TL-2026-0713.

12 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

Patched by Redis on May 5, 2026 (fixed in 8.6.3 and backported series).

DarkReplica is a critical-impact, post-authentication remote code execution vulnerability (CVE-2026-23631, GHSA-8ghh-qpmp-7826) in the Redis server's Lua functions engine, exposed through the master-replica synchronization path. It was discovered by independent researcher Yoni Sherez during the Wiz ZeroDay.Cloud 2025 event and disclosed/patched by Redis on May 5, 2026.

Redis ships two server-side Lua engines that let administrators run custom logic inside the database: the legacy scripting engine (EVAL/EVALSHA) and the newer functions engine (FUNCTION LOAD/FCALL). To keep the single-threaded server responsive, Redis handles long-running Lua by periodically yielding control back to the event loop so it can process other events — this cooperative yielding is also what makes FUNCTION KILL able to terminate a slow script. DarkReplica abuses the interaction between this yield mechanism and replication.

An attacker who can authenticate to a Redis instance instructs that instance to become a replica of an attacker-controlled master using SLAVEOF (alias REPLICAOF). The bug is reachable only on replicas where `replica-read-only` is disabled, or can be disabled, and exists in all Redis versions with Lua scripting. When the replica performs full synchronization it loads a fresh function context from the incoming RDB (Redis dump) file the rogue master serves. The replication handler frees the currently running Lua engine and installs the new context — but it does not prevent a paused/yielded Lua function from resuming. The paused function then continues executing against its freed lua_State and related objects, yielding a use-after-free.

Exploitation is complex but practical. The researchers built primitives to leak heap addresses, force deterministic heap allocations, and craft fake Lua objects. By running the vulnerable code inside Lua coroutines and carefully spraying the Lua memory arena, they regained control of the Lua VM and obtained arbitrary read/write primitives. From there they redirected internal Lua function pointers to libc functions and invoked system commands, achieving full remote code execution on the host under the Redis service account.

The NVD primary CVSS v3.1 base score is 8.1 (HIGH, AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H); GitHub's secondary CVSS v4.0 score is 6.1 (MEDIUM, AC:H reflecting exploitation complexity). The integrity and availability impact is HIGH (code execution, full host control) with no direct confidentiality vector scored, though host RCE trivially exposes all data. The precondition — valid credentials plus advanced memory-corruption tradecraft — bounds mass exploitation, but the risk is acute for internet-exposed or weakly-authenticated Redis deployments and for any environment where an attacker can obtain valid credentials or where replicas run with replica-read-only disabled. The flaw is distinct from prior Redis threats tracked on the platform (CVE-2026-23479 / TL-2026-0682 and P2Pinfect / TL-2026-0537).

Defenders should upgrade to fixed releases immediately (8.6.3 and the backported 7.2.x / 7.4.x / 8.2.x / 8.4.x / 8.6.x fixes published May 5, 2026), enforce strong authentication and ACLs, restrict the SLAVEOF/REPLICAOF and Lua command surface via ACL, keep `replica-read-only` enabled, and isolate Redis from untrusted networks. Where patching is not immediately possible, the vendor workaround is to prevent users from executing Lua scripts or avoid replicas with replica-read-only disabled.

MITRE ATT&CK techniques by tactic:

Execution

T1059 Command and Scripting Interpreter; T1106 Native API; T1203 Exploitation for Client Execution

Privilege Escalation

T1068 Exploitation for Privilege Escalation

Discovery

T1082 System Information Discovery

Credential Access

T1110 Brute Force

Initial Access

T1190 Exploit Public-Facing Application

Lateral Movement

T1210 Exploitation of Remote Services

Defense Evasion

T1211 Exploitation for Stealth

Impact

T1565 Data Manipulation

Reconnaissance

T1595 Active Scanning

Resource Development

T1608 Stage Capabilities

Remediation

Patches

  • Redis 8.6.3 (primary fix)
  • Backported fixes in 7.2.x, 7.4.x, 8.2.x, 8.4.x, 8.6.x series (released 2026-05-05)

Immediate actions

  • Upgrade Redis to a fixed release immediately: 8.6.3 or the backported fixes across 7.2.x / 7.4.x / 8.2.x / 8.4.x / 8.6.x published 2026-05-05
  • Audit all internet-exposed and internal Redis instances; remove direct network exposure and bind to trusted interfaces only
  • Enforce strong authentication (requirepass / ACL users) and rotate any weak or shared Redis credentials

Workarounds

  • Prevent users from executing Lua scripts (restrict EVAL/FUNCTION via ACL)
  • Avoid using replicas where replica-read-only is disabled

Longer-term hardening

  • Keep replica-read-only enabled on all replicas and forbid disabling it via configuration management
  • Restrict the Lua command surface (EVAL/EVALSHA/FUNCTION/FCALL) and replication commands (SLAVEOF/REPLICAOF) using Redis ACL category and command rules for non-admin users
  • Deploy network segmentation so Redis cannot initiate outbound replication to untrusted/attacker-controlled masters
  • Monitor for unexpected REPLICAOF/SLAVEOF reconfiguration and unexpected changes to functions/scripts

Affected and fixed versions

  • Redis — redis-server
    Vulnerable versions: all versions with Lua scripting prior to fixed releases; 7.2.x < fixed; 7.4.x < fixed; 8.2.x < fixed; 8.4.x < fixed; 8.6.x < 8.6.3
    Fixed in: 8.6.3; 7.2.x (2026-05-05); 7.4.x (2026-05-05); 8.2.x (2026-05-05); 8.4.x (2026-05-05); 8.6.x (2026-05-05)

Timeline

  • DarkReplica use-after-free discovered by independent researcher Yoni Sherez during the Wiz ZeroDay.Cloud 2025 research event.
  • Redis releases 8.6.3 along with backported fixes across the 7.2.x, 7.4.x, 8.2.x, 8.4.x, and 8.6.x maintained series.
  • Redis publishes security advisory GHSA-8ghh-qpmp-7826 and assigns CVE-2026-23631 for the Lua functions-engine use-after-free during replication.
  • NVD assigns primary CVSS v3.1 base score 8.1 (HIGH) and CWE-416; GitHub secondary CVSS v4.0 base score 6.1 (MEDIUM).
  • Threadlinqs Intelligence opens TL-2026-0713 to track DarkReplica with detection and simulation coverage.
  • Public technical write-up describing the full exploitation chain (heap leak, fake Lua objects, coroutine-driven UAF, libc redirection to RCE) published by Cyber Security News.

Sources cited

Previous and next in vulnerability

Drafted by the Threadlinqs research pipeline from 5 sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats