{"id":"DHI-acqi-v3y2-e6jg-refj","summary":"### Impact","details":"### Impact\r\n\r\nThis is a use-after-free (CWE-416). Any 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 it on a server with client eviction enabled. The blocked clients do not have to belong to the attacker. The result is a reliable crash of the server process.\r\n\r\nServers with `maxmemory-clients 0` (the default) are not affected.\r\n\r\n### Details\r\n\r\nAfter a command runs, `processCommand()` in `src/server.c` calls `handleClientsBlockedOnKeys()` to serve the clients blocked on keys the command made ready. `unblockClientOnKey()` in `src/blocked.c` points `server.current_client` at each blocked client and re-executes its command through `processCommandAndResetClient()`, and `processCommand()` starts by calling `evictClients()`.\r\n\r\nIf the replies sent to blocked clients earlier in the same pass push client memory over `maxmemory-clients`, `evictClients()` can pick the client whose command made the key ready, which is still on the call stack. `freeClient()` in `src/networking.c` only defers freeing for `server.current_client`, so that client is freed immediately, and `commandProcessed()`, `updateClientMemUsageAndBucket()` and `beforeNextClient()` then run on the freed client. Among other things, `resetClient()` reads the argument vector pointers stored in the freed client and frees them.\r\n\r\n### Mitigation\r\n\r\nYou can mitigate this issue by setting `maxmemory-clients` to `0`, which disables client eviction. If you do, make sure `client-output-buffer-limit` and `maxmemory` still bound client memory.\r\n\r\nIf client eviction is required, you can reduce exposure by using 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` / `XREADGROUP` with `BLOCK`).\r\n\r\n### Credits\r\n\r\nThe defect was found and fixed by https://github.com/nadav-levanoni (issue #5422, fix #5435).","modified":"2026-11-26T04:45:25.906845569Z","published":"2026-11-23T22:07:18Z","upstream":["CVE-2026-130822"],"references":[{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-acqi-v3y2-e6jg-refj"},{"type":"ADVISORY","url":"https://github.com/valkey-io/valkey/security/advisories/GHSA-3885-pq5f-788j"},{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2026-130822"},{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2026-130822"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-130822"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2026-130822"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-130822"},{"type":"WEB","url":"https://github.com/valkey-io/valkey/issues/5422"},{"type":"WEB","url":"https://github.com/valkey-io/valkey/pull/5435"},{"type":"ADVISORY","url":"https://ubuntu.com/security/CVE-2026-130822"},{"type":"ADVISORY","url":"http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-130822"}],"affected":[{"package":{"name":"valkey","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/valkey"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"9.0.0-r1"}]}],"versions":["9.0.0-r1","9.0.3-r0","9.0.4-r0","9.0.7-r0","9.0.8-r0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-acqi-v3y2-e6jg-refj.json"}},{"package":{"name":"valkey","ecosystem":"Docker Hardened Images:Alpine:3.24","purl":"pkg:apk/dhi/valkey"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"9.0.4-r0"}]}],"versions":["9.0.4-r0","9.0.7-r0","9.0.8-r0"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-acqi-v3y2-e6jg-refj.json","owner_kind":"HSP"}},{"package":{"name":"valkey-7.2","ecosystem":"Docker Hardened Images:Debian:13","purl":"pkg:deb/dhi/valkey-7.2"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.2.14-0"}]}],"versions":["7.2.14-0","7.2.15-0","7.2.16-0","7.2.16-1"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-acqi-v3y2-e6jg-refj.json","owner_kind":"HSP"}},{"package":{"name":"valkey-8.0","ecosystem":"Docker Hardened Images:Debian:13","purl":"pkg:deb/dhi/valkey-8.0"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.0.10-0"}]}],"versions":["8.0.10-0","8.0.11-0","8.0.12-0","8.0.13-0","8.0.13-1"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-acqi-v3y2-e6jg-refj.json","owner_kind":"HSP"}},{"package":{"name":"valkey-8.1","ecosystem":"Docker Hardened Images:Debian:13","purl":"pkg:deb/dhi/valkey-8.1"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.1.9-0"}]}],"versions":["8.1.10-0","8.1.11-0","8.1.12-0","8.1.12-1","8.1.9-0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-acqi-v3y2-e6jg-refj.json"}},{"package":{"name":"valkey-9.1","ecosystem":"Docker Hardened Images:Debian:13","purl":"pkg:deb/dhi/valkey-9.1"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.4-0"}]}],"versions":["9.1.1-0","9.1.2-0","9.1.3-0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-acqi-v3y2-e6jg-refj.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}