Valkey: Integer truncation in cluster publish message construction causes a heap buffer overflow
Summary
| CVE | CVE-2026-136156 |
|---|---|
| State | PUBLISHED |
| Assigner | Akrites |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-24 15:17:33 UTC |
| Updated | 2026-11-24 15:19:53 UTC |
| Description | In Valkey before 7.2.15, 8.0.x before 8.0.12, 8.1.x before 8.1.11, 9.0.x before 9.0.7, 9.1.x before 9.1.3 and 9.2.0-rc1, running in cluster mode, clusterCreatePublishMsgBlock computes the length of the cluster bus message for a PUBLISH or SPUBLISH as a size_t but passes it to createClusterMsgSendBlock as a uint32_t. When the channel and message together exceed 4 GiB, the length is truncated, a buffer far smaller than the message is allocated, and the full channel and message are then copied into it. An authenticated user who can publish, for example by building the arguments in a script, can overflow the heap with attacker-controlled bytes. This reliably crashes the server and may lead to remote code execution. Servers that do not run in cluster mode 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-122 | CWE-197 | CWE-197 CWE-197 Numeric Truncation Error | CWE-122 CWE-122 Heap-based Buffer Overflow
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | 7fefd608-56a6-419f-a002-fd8543c0710a | Secondary | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Valkey | Valkey | affected 7.2.15 semver | Not specified |
| CNA | Valkey | Valkey | affected 8.0.0 8.0.12 semver | Not specified |
| CNA | Valkey | Valkey | affected 8.1.0 8.1.11 semver | Not specified |
| CNA | Valkey | Valkey | affected 9.0.0 9.0.7 semver | Not specified |
| CNA | Valkey | Valkey | affected 9.1.0 9.1.3 semver | Not specified |
| CNA | Valkey | Valkey | affected 9.2.0-rc1 9.2.0-rc2 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/valkey-io/valkey/security/advisories/GHSA-f4q9-j22m-xqq9 | 7fefd608-56a6-419f-a002-fd8543c0710a | github.com | |
| github.com/valkey-io/valkey/pull/5030 | 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: Nenad Stojanovski working with Trend Micro Zero Day Initiative (en)
CNA: Roshan Khatri (en)
Additional Advisory Data
Solutions
CNA: Upgrade to Valkey 7.2.15, 8.0.12, 8.1.11, 9.0.7, 9.1.3, 9.2.0-rc2 or later.
Workarounds
CNA: Use Valkey ACLs to restrict the scripting commands (EVAL, EVALSHA, EVAL_RO, EVALSHA_RO, FCALL, FCALL_RO and FUNCTION) if your application does not use them, and do not raise proto-max-bulk-len above its default.
There are currently no legacy QID mappings associated with this CVE.