Valkey: Use-after-free when client eviction frees the client whose command is still executing
Summary
| CVE | CVE-2026-130822 |
|---|---|
| State | PUBLISHED |
| Assigner | Akrites |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-24 14:18:03 UTC |
| Updated | 2026-11-24 15:19:53 UTC |
| Description | In Valkey before 7.2.16, 8.0.x before 8.0.13, 8.1.x before 8.1.12, 9.0.x before 9.0.8, 9.1.x before 9.1.4 and 9.2.0 release candidates, when client eviction is enabled (maxmemory-clients is not 0), an authenticated user who can write to a key that other clients are blocked on (for example with BLPOP, BLMPOP, BZPOPMIN or XREAD BLOCK) can trigger a use-after-free. While the clients blocked on that key are served, evictClients() can select and free the client whose command made the key ready, although that command is still executing, and the server then keeps using the freed client. The blocked clients do not have to belong to the attacker. The result is a reliable crash of the server process. Servers with the default maxmemory-clients 0 are not affected. |
Risk And Classification
Primary CVSS: v3.1 7.5 HIGH from 7fefd608-56a6-419f-a002-fd8543c0710a
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Problem Types: CWE-416 | CWE-416 CWE-416 Use After Free
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | 7fefd608-56a6-419f-a002-fd8543c0710a | Secondary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 7.5 | HIGH | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
CVSS:3.1/AV:N/AC:H/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.16 semver | Not specified |
| CNA | Valkey | Valkey | affected 8.0.0 8.0.13 semver | Not specified |
| CNA | Valkey | Valkey | affected 8.1.0 8.1.12 semver | Not specified |
| CNA | Valkey | Valkey | affected 9.0.0 9.0.8 semver | Not specified |
| CNA | Valkey | Valkey | affected 9.1.0 9.1.4 semver | Not specified |
| CNA | Valkey | Valkey | affected 9.2.0-rc1 9.2.0 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/valkey-io/valkey/issues/5422 | 7fefd608-56a6-419f-a002-fd8543c0710a | github.com | |
| github.com/valkey-io/valkey/pull/5435 | 7fefd608-56a6-419f-a002-fd8543c0710a | github.com | |
| github.com/valkey-io/valkey/security/advisories/GHSA-3885-pq5f-788j | 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: Nadav Levanoni (en)
CNA: Nadav Levanoni (en)
Additional Advisory Data
Solutions
CNA: Upgrade to Valkey 7.2.16, 8.0.13, 8.1.12, 9.0.8, 9.1.4, 9.2.0 or later.
Workarounds
CNA: Set maxmemory-clients to 0, which disables client eviction; if you do, make sure client-output-buffer-limit and maxmemory still bound client memory. If client eviction is required, use Valkey ACLs so that untrusted users cannot write to keys that other clients block on, and cannot run the blocking commands (BLPOP, BRPOP, BLMOVE, BRPOPLPUSH, BLMPOP, BZPOPMIN, BZPOPMAX, BZMPOP, and XREAD or XREADGROUP with BLOCK).