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.
Project Subscriptions
No data.
Advisories
No advisories yet.
Fixes
Solution
Upgrade to Valkey 9.1.2 or later.
Workaround
Use Valkey ACLs to restrict the SCRIPT command, in particular SCRIPT DEBUG, if your application does not use the script debugger.
References
History
Tue, 24 Nov 2026 14:30:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | 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. | |
| Title | Valkey: Use-after-free of the Lua interpreter state through the script debugger's command cache | |
| Weaknesses | CWE-416 | |
| References |
| |
| Metrics |
cvssV3_1
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: Akrites
Published:
Updated: 2026-11-24T14:06:27.220Z
Reserved: 2026-11-24T13:53:38.491Z
Link: CVE-2026-136155
No data.
Status : Awaiting Analysis
Published: 2026-11-24T15:17:33.553
Modified: 2026-11-24T15:19:53.317
Link: CVE-2026-136155
No data.
OpenCVE Enrichment
Updated: 2026-11-24T17:45:02Z
Weaknesses