Servers and applications
GHSA-fq2f-crmw-q97r
Unauthenticated use-after-free of the Lua interpreter state in Valkey (script debugger command cache)
- Severity
- High 8.8
- Published
- 31 Aug 2026
- Last changed
- 31 Aug 2026
- Added to UpHeron
- 3 Nov 2026
- Fixed in
- 9.1.2
- Weakness
- Use after free (CWE-416)
- Attack
- Over the network · Needs a user account · No user action needed
- Attacker can
- Read data · Change data · Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H- Sources
- Project advisories (GitHub)
Description
An attacker who can run scripting commands can free the Lua interpreter state out from under the script debugger's cached command table, leaving a dangling pointer that is dereferenced on the next debugger command. This yields a reliable crash of the server process, and can be escalated to control of an indirect call by reclaiming the freed heap chunk with attacker-controlled bytes.
This issue affects the 9.x line. The defect was introduced when the Lua scripting engine was moved into a Valkey module. The 8.0.x and 8.1.x lines use the previous non-module debugger and are not affected.
ldbGenerateDebuggerCommandsArray in src/modules/lua/debug_lua.c builds the interactive debugger command table once and caches it in a file-scope static, binding the then-current lua_State pointer into each command descriptor's context field. The table is never rebuilt or invalidated.
Workarounds
You can mitigate this issue by using Valkey ACLs to restrict the SCRIPT command, in particular SCRIPT DEBUG, if your application doesn't intend to use the script debugger.
Affected software
| Software | Affected versions |
|---|---|
ValkeyServers and applications · github:valkey-io/valkey |
|
About Valkey
NoSQL database management software forked from Redis
- Developers who used it in the past year
- 2.4%Stack Overflow Developer Survey 2025, 2025
- Docker Hub pulls
- 404,291,684Docker Hub, 15 Nov 2026
- GitHub stars
- 27,721GitHub, 15 Nov 2026
- Forks
- 1,535GitHub, 15 Nov 2026
- Latest release
- 9.1.3GitHub, 15 Nov 2026
- Released
- 26 Oct 2026GitHub
- License
- 3-clause BSD LicenseWikidata
- Written in
- CWikidata
- First released
- 28 Mar 2024Wikidata
- First published on GitHub
- 22 Mar 2024GitHub
Website Source code Docker image
Release lines
| Release | Latest | Security fixes |
|---|---|---|
| 9.1 | 9.1.3 | Until 19 May 2031 |
| 9.0 | 9.0.7 | Until 21 Oct 2028 |
| 8.1 | 8.1.11 | Until 31 Mar 2030 |
| 8.0 | 8.0.12 | Until 15 Sept 2027 |
| 7.2 | 7.2.15 | Until 16 Apr 2029 |
From endoflife.date.
Vulnerabilities in Valkey
- In our list
- 14
- Published in the last 12 months
- 9
- Critical, last 12 months
- 0
- High, last 12 months
- 9
- Known exploited
- 0
- CVE-2026-130822Use-after-free when client eviction frees the client whose command is still executingHigh 7.5 19 Nov 2026
- GHSA-f4q9-j22m-xqq9Integer truncation in Valkey cluster publish message construction causes a heap buffer overflowHigh 8.8 26 Oct 2026
- GHSA-jcj7-v34w-v9vvUse-after-free in the RDMA pending-data handler when a clientHigh 7.5 31 Aug 2026
- CVE-2026-63639UAF in stream deserialization may lead to remote code executionHigh 8.8 22 Jul 2026
- CVE-2026-56684UAF in Valkey with TLS may lead to remote code executionHigh 7.5 22 Jul 2026
- CVE-2026-27623Valkey is a distributed key-value database. Starting in version 9.0.0 and prior to version 9.0.3, a malicious actor with network access to Valkey can cause the system to abort by triggering an assertion. When processing incoming requests, the Valkey system does not properly reset the networking state after processing an empty request. A malicious actor can then send a request that the server…High 7.5 23 Feb 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-fq2f-crmw-q97r
- github.com https://github.com/valkey-io/valkey/security/advisories/GHSA-fq2f-crmw-q97r