Valkey JSON is the module that gives Valkey its JSON.* commands, and the valkey-bundle image ships it loaded. A recursive JSONPath such as $..* matches an array and the elements nested inside it, and the five commands that change an array’s size (JSON.ARRAPPEND, JSON.ARRINSERT, JSON.ARRPOP, JSON.ARRTRIM, JSON.CLEAR) processed the ancestor first. Growing or shrinking the ancestor can reallocate its element buffer and free the old storage while the descendant matches in the same result set still point into it, and the module then writes through those dangling pointers. An authenticated client that can run those commands can crash the server reliably, and the advisory says the bug has been developed into code execution as the server’s user. Upgrade Valkey JSON to 1.0.3, or to a valkey-bundle release that ships it, and restart; until then, use ACLs to deny the five array commands to users who do not need them, and keep user-supplied JSONPath expressions out of them. Servers that do not load the JSON module are not affected.
CVE-2026-136158 at a glance.
| Component | Valkey JSON (the valkey-json module, src/json/selector.cc and src/json/dom.cc per the advisory), as loaded into Valkey by hand or by the official valkey-bundle image; no Linux distribution packages it |
| Affected versions | Valkey JSON 1.0.0, 1.0.1 and 1.0.2 (the record and NVD; the GitHub advisory’s “affected” field says <1.0.2, which its own description contradicts). Every valkey-bundle image built on those releases |
| Fixed in | Valkey JSON 1.0.3, released 31 August 2026 with urgency “security” (pull request #120 “Fixing crash on recursive path mutation”, which orders a result set deepest-first before mutating and refactors the array mutators; #118 is the 1.0.3 release itself). Pull the valkey-bundle image that carries 1.0.3 |
| Severity | Valkey (Akrites CNA) CVSS 3.1 8.8 High (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H); NVD Awaiting Analysis, same vector. CWE-416, use after free. Red Hat’s security-data feed returned an error for this CVE, so no Red Hat rating is reproduced here; Debian lists it as not-for-us |
| Exploited in the wild | Not on CISA’s Known Exploited Vulnerabilities list as of 30 November 2026. EPSS 0.0117 (67th percentile) on 30 November 2026. The advisory says remote code execution was demonstrated against an official valkey-bundle image, which is a working exploit in the reporters’ hands, not evidence of use in the wild |
| Who is exposed | Valkey servers with the JSON module loaded whose clients are not all trusted, and above all applications that pass user-controlled JSONPath expressions to the array-mutating commands, which the advisory singles out as the most exposed. The attacker needs a connection that may run those commands. Servers without the module, and ACL users denied the five commands, are not affected |
| Published | CVE record 24 November 2026; GitHub advisory GHSA-q7rf-74qm-hr9g 31 August 2026 (credit Joao Teles, who reported first and supplied the chain, Pham Huong Giang, and Troy Coll of Heroku Data Services at Salesforce via Aiven’s disclosure programme; fix by zackcam); this page built 30 November 2026, last updated 30 November 2026 |
What it is
A JSONPath query returns a set of matches, and a recursive descent ($..*) can return a container together with things inside it: an array, and the array’s own elements, in the same result set. For a read that is harmless. For a mutation it is not, because the five size-changing array commands walked the result set in order and applied the change to each match. The record describes the sequence: the ancestor array is processed first, the change can reallocate its element buffer, the old storage is freed, and the descendant entries later in the result set still point into it; the module then “writes through those dangling pointers”. The attacker controls the document and the path, so they control what the freed storage held and what gets written.
The advisory is unusually direct about the outcome: a reliable crash, and the bug “has been developed into remote code execution as the user the server runs as”, demonstrated on an official valkey-bundle image. The fix in pull request #120 adds order_result_set_deepest_first(), a stable sort by depth so descendants are mutated before their ancestors and no pointer outlives the buffer it points into, and reworks the internal array pop, insert and trim functions and dom_clear around that ordering. It shipped in Valkey JSON 1.0.3 on 31 August 2026; as with its siblings, the CVE id was assigned on 24 November.
Two populations should read this carefully. The first is anyone running valkey-bundle, because the module is loaded whether or not the application uses it, and an attacker with a connection can use it. The second is applications that build JSONPath expressions from user input, where the attacker does not even need their own connection: the application runs the recursive path for them. The project’s workaround covers both halves, ACLs on the five commands and no recursive paths from untrusted input.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 30 November 2026; the link in the row is the tracker page, which will be newer than this one. The JSON module is not a distribution package anywhere, so the rows that matter are the last two.
| Distribution | Status | Fixed package |
|---|---|---|
| Debian | Not for Debian | “NOT-FOR-US: Valkey JSON”; Debian’s valkey package does not include the module |
| Ubuntu | Tracker unreachable on 30 November 2026 | Ubuntu’s CVE page refused automated readers; its valkey package is Debian’s and does not include the module |
| Red Hat | No assessment reachable on 30 November 2026 | Red Hat’s security-data feed returned a client error for this CVE; RHEL’s valkey does not ship the module |
| SUSE, Fedora, Arch, Alpine | Not consulted | none of them packages the module; trackers not read for this page |
Official valkey-bundle image, Helm charts and operators that load valkey-json | Affected on module 1.0.0 to 1.0.2 | a bundle release that ships Valkey JSON 1.0.3; check the module version from inside the server rather than trusting the image tag |
Hand-built module loaded with loadmodule | Affected below 1.0.3 | Valkey JSON 1.0.3 or later, built from the tag |
How to check
Three questions: is the JSON module loaded at all, which version is it, and which users may run the five array commands. The first clears every plain Valkey.
# 1. and 2. the module and its version: no "json" entry means this bug cannot be reached
valkey-cli MODULE LIST
# the "ver" field is an integer: 10003 is 1.0.3; 10000..10002 are affected
grep -nE '^\s*loadmodule.*json' /etc/valkey/valkey.conf /etc/valkey.conf 2>/dev/null
docker ps --format '{{.Names}} {{.Image}}' 2>/dev/null | grep -i bundle
# 3. who may run the array mutators
valkey-cli ACL LIST | grep -E '\+@all|\+@json|json\.arr|json\.clear'
# does the application pass user input into JSONPath arguments? (search your code for the commands)
grep -rniE 'JSON\.(ARRAPPEND|ARRINSERT|ARRPOP|ARRTRIM|CLEAR)' /srv /opt /var/www 2>/dev/null | headNo json module in MODULE LIST means you are done. Module version 10003 or later means you are done too. An affected module where only your own application connects, as a user that cannot run the five commands, and where the application never builds a JSONPath from user input, is a patching chore. An affected module on a valkey-bundle reachable by clients you would not hand a shell to, or behind an application that lets users supply paths, is the vulnerable configuration.
How to fix it
Load Valkey JSON 1.0.3 and restart the server; a module is loaded at start, so there is no in-place reload that replaces it.
# valkey-bundle: pull a release that ships Valkey JSON 1.0.3 and recreate
docker pull valkey/valkey-bundle:latest && docker compose up -d --force-recreate
# hand-built module: build the 1.0.3 tag, replace the .so named in loadmodule, restart
systemctl restart valkey-server 2>/dev/null || systemctl restart valkey
valkey-cli MODULE LIST # ver must read 10003 or laterIf you cannot upgrade yet, do what the advisory says: deny JSON.ARRAPPEND, JSON.ARRINSERT, JSON.ARRPOP, JSON.ARRTRIM and JSON.CLEAR to users who do not need them, and make sure your application never passes a recursive path (anything with ..) from user input into those commands. Do not treat a password as the mitigation, since the attacker here is logged in, and do not unload the module on a running bundle expecting to be safe: MODULE UNLOAD refuses modules that hold data types, so the honest options are the upgrade or the ACL.
# mitigation: no array mutators for the application user
valkey-cli ACL SETUSER appuser -json.arrappend -json.arrinsert -json.arrpop -json.arrtrim -json.clear
valkey-cli ACL SAVE 2>/dev/null || echo "ACL SAVE needs aclfile set; copy the rules into valkey.conf instead"
valkey-cli ACL GETUSER appuser | grep -A1 commandsSources
- CVE-2026-136158 at CVE.org — the Akrites (Valkey) CNA record (24 November 2026): the description, CVSS 3.1 8.8, CWE-416, the affected range, the workaround and the credits
- GHSA-q7rf-74qm-hr9g — the project’s advisory of 31 August 2026, naming the files and the demonstrated code execution
- Pull request #120 “Fixing crash on recursive path mutation” and #118, the 1.0.3 release; Valkey JSON releases for the 1.0.3 notes of 31 August 2026
- NVD entry — Awaiting Analysis; the CNA’s 8.8 and the 1.0.0 to 1.0.2 range
- Distribution trackers: Debian (not-for-us) · Ubuntu (unreachable on 30 November) · Red Hat (unreachable on 30 November)
- EPSS score for this CVE, 30 November 2026
Related reading
- CVE-2026-136155: Valkey 9.1 script debugger uses a freed Lua interpreter after SCRIPT FLUSH ASYNC — the sibling from the same 24 November set, in the core server
- CVE-2026-136156: Valkey cluster PUBLISH overflows the heap on messages over 4 GiB — the second sibling, affecting every branch in cluster mode
- Containers: What Is Actually Happening — why “the bundle image loads it anyway” is the thing to know about your attack surface
- Hardening a Public-Facing Service Beyond the Basics — per-command ACLs, the workaround for all three Valkey advisories
- The Half of Patching That Happens After the Patch is Installed — a module is loaded at start, so a new .so does nothing until the server restarts
This advisory page was assembled from the primary sources listed above on 30 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.

