DHI-5vc4-422t-xsfy-7efw

Source
https://scout.docker.com/v/DHI-5vc4-422t-xsfy-7efw
Import Source
https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-5vc4-422t-xsfy-7efw.json
JSON Data
https://api.osv.dev/v1/vulns/DHI-5vc4-422t-xsfy-7efw
Upstream
Published
2026-11-26T12:50:47Z
Modified
2026-11-28T07:30:05Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
## Impact
Details

Impact

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.

Details

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.

SCRIPT FLUSH ASYNC recreates the scripting engine, creating the replacement interpreter state before freeing the previous one on the lazyfree thread. Nothing clears the cached command table, so its context is left pointing at a freed chunk. Any subsequent debugger command dereferences it.

Because the freed chunk lives on the ordinary allocator heap, it can be reclaimed with attacker-controlled bytes and shaped into a counterfeit interpreter state, at which point the next allocation performed by the interpreter calls the allocator function pointer stored inside that state.

A second use-after-free in ldbLogStackValue is fixed in the same change: the logged module string was freed while the debugger log list still held a reference to it.

Mitigation

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.

Credits

The defect was independently reported by Trung Nguyen (@everping) of CyStack, by Phuc Nguyen Dinh (pucagit) of CyStack, and Han Sang-Kyung (toky1219@gmail.com).

The fix was authored by https://github.com/Baraa-Hasheesh.

References

Affected packages

Docker Hardened Images:Debian:13 / valkey-7.2

Package

Name
valkey-7.2
Purl
pkg:deb/dhi/valkey-7.2

Affected ranges

Type
ECOSYSTEM
Events
Introduced
7.2.14-0

Affected versions

7.*
7.2.14-0
7.2.15-0
7.2.16-0
7.2.16-1

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-5vc4-422t-xsfy-7efw.json"

Docker Hardened Images:Debian:13 / valkey-8.1

Package

Name
valkey-8.1
Purl
pkg:deb/dhi/valkey-8.1

Affected ranges

Type
ECOSYSTEM
Events
Introduced
8.1.9-0

Affected versions

8.*
8.1.9-0
8.1.10-0
8.1.11-0
8.1.12-0
8.1.12-1

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-5vc4-422t-xsfy-7efw.json"

Docker Hardened Images:Debian:13 / valkey-9.1

Package

Name
valkey-9.1
Purl
pkg:deb/dhi/valkey-9.1

Affected ranges

Type
ECOSYSTEM
Events
Introduced
9.1.1-0

Affected versions

9.*
9.1.1-0
9.1.2-0
9.1.3-0
9.1.4-0
9.1.4-1

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-5vc4-422t-xsfy-7efw.json"