Valkey JSON: Use-after-free in array mutation commands through a recursive JSONPath
Summary
| CVE | CVE-2026-136158 |
|---|---|
| State | PUBLISHED |
| Assigner | Akrites |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-24 15:17:33 UTC |
| Updated | 2026-11-24 15:19:53 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 8.8 HIGH from 7fefd608-56a6-419f-a002-fd8543c0710a
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Problem Types: CWE-416 | CWE-416 CWE-416 Use After Free
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | 7fefd608-56a6-419f-a002-fd8543c0710a | Secondary | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Valkey | Valkey JSON | affected 1.0.0 1.0.3 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/valkey-io/valkey-json/security/advisories/GHSA-q7rf-74qm-hr9g | 7fefd608-56a6-419f-a002-fd8543c0710a | github.com | |
| github.com/valkey-io/valkey-json/pull/118 | 7fefd608-56a6-419f-a002-fd8543c0710a | github.com | |
| github.com/valkey-io/valkey-json/pull/120 | 7fefd608-56a6-419f-a002-fd8543c0710a | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Joao Teles (en)
CNA: Pham Huong Giang (en)
CNA: Troy Coll of Heroku Data Services (Salesforce) (en)
CNA: zackcam (en)
Additional Advisory Data
Solutions
CNA: Upgrade to Valkey JSON 1.0.3 or later, or to a valkey-bundle release that ships it.
Workarounds
CNA: Use Valkey ACLs to restrict JSON.ARRAPPEND, JSON.ARRINSERT, JSON.ARRPOP, JSON.ARRTRIM and JSON.CLEAR if your application does not use them. Applications that pass user-controlled JSONPath expressions to these commands are the most exposed; limiting paths to non-recursive expressions also avoids the defect.
There are currently no legacy QID mappings associated with this CVE.