Vulnerability · Published Apr 13, 2026 · Assigned by GitHub_M

CVE-2026-39956jq: Missing runtime type checks for _strindices lead to crash and limited memory disclosure

Medium 6.1

In plain English

A medium-severity out-of-bounds read in jq from jqlang. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 7% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.2%top 93.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.22jq1.8.2-r0ALPINE-CVE-2026-39956
Alpine:v3.23jq1.8.2-r0ALPINE-CVE-2026-39956
Alpine:v3.24jq1.8.2-r0ALPINE-CVE-2026-39956
Debian:12jq1.6-2.1+deb12u2DEBIAN-CVE-2026-39956
Debian:13jq1.7.1-6+deb13u2DEBIAN-CVE-2026-39956
Debian:14jq1.8.1-5DEBIAN-CVE-2026-39956
Ubuntu:22.04:LTSjq1.6-2.1ubuntu3.2USN-8202-1
Ubuntu:22.04:LTSjq1.6-2.1ubuntu3.2UBUNTU-CVE-2026-39956
Ubuntu:24.04:LTSjq1.7.1-3ubuntu0.24.04.2USN-8202-1
Ubuntu:24.04:LTSjq1.7.1-3ubuntu0.24.04.2UBUNTU-CVE-2026-39956
Ubuntu:25.10jq1.8.1-3ubuntu1.1UBUNTU-CVE-2026-39956
Ubuntu:25.10jq1.8.1-3ubuntu1.1USN-8202-1
Ubuntu:26.04:LTSjq1.8.1-4ubuntu2UBUNTU-CVE-2026-39956

Affected products (as reported)

VendorProductVersions
jqlang jq < 1.8.2

Weakness: CWE-125, CWE-476, CWE-843 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H

References