CVE-2026-136158

Valkey JSON: Use-after-free in array mutation commands through a recursive JSONPath

Published Nov 24, 2026 CVSS 3.1 · 8.8 High EPSS n/a KEV · Not listed
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.

Analysis

No analysis available yet

Remediation

Vendor Solution

Upgrade to Valkey JSON 1.0.3 or later, or to a valkey-bundle release that ships it.


Vendor Workaround

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.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title Valkey JSON: Use-after-free in array mutation commands through a recursive JSONPath
Weaknesses CWE-416
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
Akrites
Published
Updated
Nov 24, 2026, 2:06 PM
Reserved
Nov 24, 2026, 1:53 PM

No data.