CVE-2026-136158 - Valkey JSON: Use-after-free in array mutation commands through a recursive JSONPath
Vulnerability · Reported by NVD · · CWE-416
- Severity
- High Risk score 88/100
- CVSS
- 8.8 v3.1 · from NVD
- Exploit chance (EPSS)
- 1.17% Higher than 67% of CVEs
- Known exploited
- No Not in CISA KEV
Summary
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.
How this vulnerability can be exploited
This is a use-after-free flaw (CWE-416). An attacker can exploit this vulnerability remotely over the network, with a low-privileged account, and without any action from a user. Attack complexity is low, so no special conditions are needed. If successful, the attacker could read sensitive data, modify data or code and crash or disrupt the service.
Is it being exploited?
The EPSS model estimates a 1.17% chance this CVE will be exploited in the next 30 days, which is elevated and higher than 67% of all published CVEs.
Patch priority and what to do
Schedule patching in your next maintenance window, and sooner for internet-facing systems. 1) Check whether you run the affected product and version. 2) Apply the vendor update or patch listed in the advisory. 3) Until patched, restrict network access to the service (firewall, VPN, WAF rules). 4) Review logs for signs of exploitation since the publication date.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Tags
rce, CVE-2026-136158
Sources & references
- Original article / advisory (NVD) ↗
- NIST NVD: CVE-2026-136158 ↗
- CVE.org record ↗
- FIRST.org EPSS model ↗
How this data is collected: methodology & sources.