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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.22 | jq | 1.8.2-r0 | ALPINE-CVE-2026-39956 |
| Alpine:v3.23 | jq | 1.8.2-r0 | ALPINE-CVE-2026-39956 |
| Alpine:v3.24 | jq | 1.8.2-r0 | ALPINE-CVE-2026-39956 |
| Debian:12 | jq | 1.6-2.1+deb12u2 | DEBIAN-CVE-2026-39956 |
| Debian:13 | jq | 1.7.1-6+deb13u2 | DEBIAN-CVE-2026-39956 |
| Debian:14 | jq | 1.8.1-5 | DEBIAN-CVE-2026-39956 |
| Ubuntu:22.04:LTS | jq | 1.6-2.1ubuntu3.2 | USN-8202-1 |
| Ubuntu:22.04:LTS | jq | 1.6-2.1ubuntu3.2 | UBUNTU-CVE-2026-39956 |
| Ubuntu:24.04:LTS | jq | 1.7.1-3ubuntu0.24.04.2 | USN-8202-1 |
| Ubuntu:24.04:LTS | jq | 1.7.1-3ubuntu0.24.04.2 | UBUNTU-CVE-2026-39956 |
| Ubuntu:25.10 | jq | 1.8.1-3ubuntu1.1 | UBUNTU-CVE-2026-39956 |
| Ubuntu:25.10 | jq | 1.8.1-3ubuntu1.1 | USN-8202-1 |
| Ubuntu:26.04:LTS | jq | 1.8.1-4ubuntu2 | UBUNTU-CVE-2026-39956 |
Affected products (as reported)
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
- https://github.com/jqlang/jq/security/advisories/GHSA-6gc3-3g9p-xx28 x_refsource_CONFIRM
- https://github.com/jqlang/jq/commit/fdf8ef0f0810e3d365cdd5160de43db46f57ed03 x_refsource_MISC