Skip to content
OpenAdvisories
Medium · 6.1 CVE-2026-39956 EUVD-2026-22126

jq: Missing runtime type checks for _strindices lead to crash and limited memory disclosure

Published Apr 13, 2026 · Updated Sep 4, 2026 · Assigned by GitHub_M

Description

jq is a command-line JSON processor. Prior to version 1.8.2, the _strindices builtin in jq's src/builtin.c passes its arguments directly to jv_string_indexes() without verifying they are strings, and jv_string_indexes() in src/jv.c relies solely on assert() checks that are stripped in release builds compiled with -DNDEBUG. This allows an attacker to crash jq trivially with input like _strindices(0), and by crafting a numeric value whose IEEE-754 bit pattern maps to a chosen pointer, achieve a controlled pointer dereference and limited memory read/probe primitive. Any deployment that evaluates untrusted jq filters against a release build is vulnerable. This issue has been patched in commit fdf8ef0f0810e3d365cdd5160de43db46f57ed03, which is part of version 1.8.2.

Affected products

VendorProductAffectedFixed
jqlang jq < 1.8.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 jq 1.8.1-5 —
Debian 13 jq 1.7.1-6+deb13u2 —
Debian 12 jq 1.6-2.1+deb12u2 —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS jq 1.8.1-4ubuntu2 —
Ubuntu 25.10 jq 1.8.1-3ubuntu1.1 USN-8202-1
Ubuntu 24.04 LTS jq 1.7.1-3ubuntu0.24.04.2 USN-8202-1
Ubuntu 22.04 LTS jq 1.6-2.1ubuntu3.2 USN-8202-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS jq 1.6-1ubuntu0.20.04.1+esm2 USN-8202-1
Ubuntu Pro 18.04 LTS jq 1.5+dfsg-2ubuntu0.1~esm2 USN-8202-1
Ubuntu Pro 16.04 LTS jq 1.5+dfsg-1ubuntu0.1+esm4 USN-8202-1
Ubuntu Pro 14.04 LTS jq 1.3-1.1ubuntu1.1+esm4 USN-8202-1
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 jq +1 1.8.1-3.hum1 RHSA-2026:8579
ReleasePackageFixed inAdvisory
SLES 15 SP7 jq 1.6-150000.3.20.1 SUSE-SU-2026:2983-1
Show 8 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 jq 1.7.1-160000.3.1 SUSE-SU-2026:22566-1
SLES 16.0 jq 1.7.1-160000.3.1 SUSE-SU-2026:22566-1
SLE Micro 6.2 jq 1.7.1-160000.3.1 SUSE-SU-2026:22545-1
SLE Micro 6.1 jq 1.7.1-slfo.1.1_3.1 SUSE-SU-2026:22664-1
SLE Micro 6.0 jq 1.6-6.1 SUSE-SU-2026:22705-1
SLE Micro 5.5 jq 1.6-150000.3.20.1 SUSE-SU-2026:2983-1
SLE Micro 5.4 jq 1.6-150000.3.20.1 SUSE-SU-2026:2983-1
SLE Micro 5.3 jq 1.6-150000.3.20.1 SUSE-SU-2026:2983-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed jq 1.8.1-3.1 openSUSE-SU-2026:10850-1
openSUSE Leap 16.0 jq 1.7.1-160000.3.1 openSUSE-SU-2026:21248-1
ReleasePackageFixed inAdvisory
Alpine v3.24 jq 1.8.2-r0 —
Alpine v3.23 jq 1.8.2-r0 —
Alpine v3.22 jq 1.8.2-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 jq +1 1.8.1-59.amzn2023 ALAS2023-2026-1815
Amazon Linux 2 jq +1 1.6-17.amzn2.0.1 ALAS2-2026-3496

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 jq 1.7.1-5 —

Advisories 11

References