CVE-2026-136155: Valkey: Use-after-free of the Lua interpreter state through the script debugger's command cache

Published Nov 24, 2026
·
Updated

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.

Affected Software

1 affected component
Valkey Valkey=9.1.0, =9.1.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 9.1.2

Event History

Nov 24, 2026
CVE Published
via MITRE·02:06 PM
Data Sourced
via MITRE·02:06 PM
RemedyDescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are affected?

Valkey 9.1.0 and 9.1.1 are affected. Valkey 8.0.x and 8.1.x use the previous debugger and are not affected.

2

What access does an attacker need?

An attacker must be authenticated and able to run scripting commands. No user interaction is required, and the vulnerability is reachable over the network.

3

What is required to trigger the use-after-free?

The scripting engine must be recreated with SCRIPT FLUSH ASYNC after the debugger has built and cached its command table. A subsequent debugger command can then dereference the freed Lua interpreter state.

4

What is the likely impact if exploited?

An attacker can reliably crash the server. By reclaiming the freed heap chunk with attacker-controlled data, the issue may be escalated to control of an indirect call and potentially remote code execution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203