CVE-2026-136158
Valkey JSON: Use-after-free in array mutation commands through a recursive JSONPath
- CVSS
- 8.8
- EPSS
- 1.17% (p67)
- Published
- 2026-11-24
- Age
- 5d old
- Modified
- 2026-11-25
- Product
- Valkey Valkey JSON
- Aliases
- GHSA-q7rf-74qm-hr9g
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
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.
Fixed in
1.0.3
Affected packages
| Ecosystem | Package | Range | Fixed |
|---|---|---|---|
| vendor | Valkey JSON | >=1.0.0, <1.0.3 | 1.0.3 |
Sources
- NVD · first seen 5d ago · NVD terms of use
- OSV · first seen 3d ago · CC-BY 4.0
- CVE List · first seen 5d ago · CVE Terms of Use
References
- https://github.com/valkey-io/valkey-json/security/advisories/GHSA-q7rf-74qm-hr9g other
- https://github.com/valkey-io/valkey-json/pull/118 other
- https://github.com/valkey-io/valkey-json/pull/120 other
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/136xxx/CVE-2026-136158.json advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-136158 advisory
- https://github.com/valkey-io/valkey-json package