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

Summary

CVECVE-2026-136155
StatePUBLISHED
AssignerAkrites
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-24 15:17:33 UTC
Updated2026-11-24 15:19:53 UTC
DescriptionIn 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.

Risk And Classification

Primary CVSS: v3.1 8.8 HIGH from 7fefd608-56a6-419f-a002-fd8543c0710a

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Problem Types: CWE-416 | CWE-416 CWE-416 Use After Free


VersionSourceTypeScoreSeverityVector
3.17fefd608-56a6-419f-a002-fd8543c0710aSecondary8.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
3.1CNACVSS8.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Valkey Valkey affected 9.1.0 9.1.2 semver Not specified

References

ReferenceSourceLinkTags
github.com/valkey-io/valkey/security/advisories/GHSA-fq2f-crmw-q97r 7fefd608-56a6-419f-a002-fd8543c0710a github.com
github.com/valkey-io/valkey/pull/4574 7fefd608-56a6-419f-a002-fd8543c0710a github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Trung Nguyen of CyStack (en)

CNA: Phuc Nguyen Dinh of CyStack (en)

CNA: Han Sang-Kyung (en)

CNA: Bara' Hasheesh (en)

Additional Advisory Data

Solutions

CNA: Upgrade to Valkey 9.1.2 or later.

Workarounds

CNA: Use Valkey ACLs to restrict the SCRIPT command, in particular SCRIPT DEBUG, if your application does not use the script debugger.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report