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

Medium 6.1 Published Updated

Attackers can crash jq or read limited memory by exploiting missing type checks in the _strindices builtin when processing untrusted filters.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-39956?

CVE-2026-39956 is a medium-severity memory corruption vulnerability in jqlang jq, published on 13 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

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.

Weakness: CWE-843, CWE-476, CWE-125

Which versions are affected by CVE-2026-39956?

It affects 1 product.

Products include Jqlang Jq.

How do I fix CVE-2026-39956?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-39956 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-39956 exists.

Sources

Also known as ALPINE-CVE-2026-39956, AZL-82973, BELL-CVE-2026-39956, CLSA-2026-1786762772, CLSA-2026-1787781806, DEBIAN-CVE-2026-39956 and 2 more.

Is CVE-2026-39956 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free