CVE-2026-136155 - Valkey: Use-after-free of the Lua interpreter state through the script debugger's command cache
Vulnerability · Reported by NVD · · CWE-416
- Severity
- High Risk score 88/100
- CVSS
- 8.8 v3.1 · from NVD
- Exploit chance (EPSS)
- 0.95% Higher than 60% of CVEs
- Known exploited
- No Not in CISA KEV
Summary
In Valkey 9.1.0 and 9.1.1, the Lua script debugger builds its command table once and caches it with a pointer to the Lua interpreter state that was current at the time. SCRIPT FLUSH ASYNC recreates the scripting engine and frees the previous interpreter state without invalidating that cache, so the next debugger command dereferences freed memory. An authenticated user who can run scripting commands can use this to reliably crash the server, and by reclaiming the freed heap chunk with attacker-controlled bytes can escalate it to control of an indirect call, which may lead to remote code execution. The fix also addresses a second use-after-free in ldbLogStackValue. Valkey 8.0.x and 8.1.x use the previous debugger and are not affected.
How this vulnerability can be exploited
This is a use-after-free flaw (CWE-416). An attacker can exploit this vulnerability remotely over the network, with a low-privileged account, and without any action from a user. Attack complexity is low, so no special conditions are needed. If successful, the attacker could read sensitive data, modify data or code and crash or disrupt the service.
Is it being exploited?
The EPSS model estimates a 0.95% chance this CVE will be exploited in the next 30 days, which is low and higher than 60% of all published CVEs.
Patch priority and what to do
Schedule patching in your next maintenance window, and sooner for internet-facing systems. 1) Check whether you run the affected product and version. 2) Apply the vendor update or patch listed in the advisory. 3) Until patched, restrict network access to the service (firewall, VPN, WAF rules). 4) Review logs for signs of exploitation since the publication date.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Tags
rce, CVE-2026-136155
Sources & references
- Original article / advisory (NVD) ↗
- NIST NVD: CVE-2026-136155 ↗
- CVE.org record ↗
- FIRST.org EPSS model ↗
How this data is collected: methodology & sources.