# CVE-2026-136158: Valkey JSON: Use-after-free in array mutation commands through a recursive JSONPath

- Severity: High 8.8 (CVSS:3.1, scored by Akrites) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.17%, higher than 68% of CVEs (2026-12-01)
- Published: 2026-11-24T14:06:29.651Z
- Modified: 2026-12-01T20:18:44.320Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- 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.

(As written by CVE List.)

## Affected

- Valkey Valkey JSON: from 1.0.0 before 1.0.3

## References

- <https://github.com/valkey-io/valkey-json/security/advisories/GHSA-q7rf-74qm-hr9g>
- <https://github.com/valkey-io/valkey-json/pull/118>
- <https://github.com/valkey-io/valkey-json/pull/120>

## Sources

- CVE List: [CVE-2026-136158](https://www.cve.org/CVERecord?id=CVE-2026-136158), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-136158](https://nvd.nist.gov/vuln/detail/CVE-2026-136158), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-136158 · Whole record: https://cve.day/CVE-2026-136158.json · Rebuilt by cve.day 2026-12-01T20:32:26.370Z
