Skip to content

CVE-2026-33947 jq: Unbounded Recursion in jv_setpath(), jv_getpath() and delpaths_sorted()

MediumCVSS 5.5 EPSS 0.24%
Published
Updated
Exploit status
No public exploit known

Description

jq is a command-line JSON processor. In versions 1.8.1 and below, functions jv_setpath(), jv_getpath(), and delpaths_sorted() in jq's src/jv_aux.c use unbounded recursion whose depth is controlled by the length of a caller-supplied path array, with no depth limit enforced. An attacker can supply a JSON document containing a flat array of ~65,000 integers (~200 KB) that, when used as a path argument by a trusted jq filter, exhausts the C call stack and crashes the process with a segmentation fault (SIGSEGV). This bypass works because the existing MAX_PARSING_DEPTH (10,000) limit only protects the JSON parser, not runtime path operations where arrays can be programmatically constructed to arbitrary lengths. The impact is denial of service (unrecoverable crash) affecting any application or service that processes untrusted JSON input through jq's setpath, getpath, or delpaths builtins. This issue has been addressed in commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f.

Affected products

ProductAffected versionsFixed in
cbl-mariner jq(CBL-Mariner:2.0) < 1.6-6 1.6-6
azure linux jq(Azure Linux:3.0) < 1.7.1-5 1.7.1-5
jqlang jq = < fb59f1491058d58bdc3e8dd28f1773d1ac690a1f No fix listed
debian/jq(Debian:12) < 1.6-2.1+deb12u2 1.6-2.1+deb12u2
debian/jq(Debian:12) = 1.6-2.1 No fix listed
debian/jq(Debian:12) = 1.6-2.1+deb12u1 No fix listed
debian/jq(Debian:13) < 1.7.1-6+deb13u2 1.7.1-6+deb13u2
debian/jq(Debian:13) = 1.7.1-6+deb13u1 No fix listed
debian/jq(Debian:14) < 1.8.1-5 1.8.1-5
debian/jq(Debian:14) = 1.8.0-1 No fix listed
debian/jq(Debian:14) = 1.8.1-1 No fix listed
debian/jq(Debian:14) = 1.8.1-2 No fix listed
debian/jq(Debian:14) = 1.8.1-3 No fix listed
debian/jq(Debian:14) = 1.8.1-4 No fix listed
redhat/jq-main(Red Hat:hummingbird:1) < 1.8.1-3.hum1 1.8.1-3.hum1
redhat/ansible-automation-platform-26/controller-rhel9(Red Hat:ansible_automation_platform:2) All versions No fix listed
redhat/ansible-automation-platform-26/hub-rhel9(Red Hat:ansible_automation_platform:2) All versions No fix listed
redhat/automation-controller(Red Hat:ansible_automation_platform:2) All versions No fix listed
redhat/jq(Red Hat:ceph_storage:4) All versions No fix listed
redhat/jq(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/jq(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/jq(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/rhcos(Red Hat:openshift:4) All versions No fix listed
ubuntu/jq(Ubuntu:22.04) < 1.6-2.1ubuntu3.2 1.6-2.1ubuntu3.2
ubuntu/jq(Ubuntu:24.04) < 1.7.1-3ubuntu0.24.04.2 1.7.1-3ubuntu0.24.04.2
Show 6 more
ProductAffected versionsFixed in
ubuntu/jq(Ubuntu:26.04) < 1.8.1-4ubuntu2 1.8.1-4ubuntu2
jqlang jq <= 1.8.1 No fix listed
alpine/jq(Alpine:v3.21) < 1.8.2-r0 1.8.2-r0
alpine/jq(Alpine:v3.22) < 1.8.2-r0 1.8.2-r0
alpine/jq(Alpine:v3.23) < 1.8.2-r0 1.8.2-r0
alpine/jq(Alpine:v3.24) < 1.8.2-r0 1.8.2-r0

References