8.8high
Valkey JSON: Use-after-free in array mutation commands through a recursive JSONPath
- Severity
- 8.8high CVSS:3.1 by Akrites
- Exploit likelihood
- 1.17% (higher than 68% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Akrites
Description
In Valkey JSON 1.0.0 through 1.0.2, a recursive JSONPath expression such as $..* returns both an array and elements nested inside it. The size-changing mutators (JSON.ARRAPPEND, JSON.ARRINSERT, JSON.ARRPOP, JSON.ARRTRIM and JSON.CLEAR) process the ancestor first, which can reallocate its element buffer and free the old storage while the descendant entries in the result set still point into it; the module then writes through those dangling pointers. An authenticated user who can run these commands can use this to reliably crash the server, and it has been developed into remote code execution as the user the server runs as. Servers that do not load the JSON module, including through valkey-bundle, are not affected.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Valkey Valkey JSON | from 1.0.0 before 1.0.3 | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-136158 changed 2026-12-01 | CVE Terms of Use |
| NVD | CVE-2026-136158 changed 2026-12-01 | Public domain |