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

Summary

CVECVE-2026-136158
StatePUBLISHED
AssignerAkrites
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-24 15:17:33 UTC
Updated2026-11-24 15:19:53 UTC
DescriptionIn 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


VersionSourceTypeScoreSeverityVector
3.17fefd608-56a6-419f-a002-fd8543c0710aSecondary8.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
3.1CNACVSS8.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Valkey Valkey JSON affected 1.0.0 1.0.3 semver Not specified

References

ReferenceSourceLinkTags
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.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report