CVE-2026-39956: jq: Missing runtime type checks for _strindices lead to crash and limited memory disclosure
jq is a command-line JSON processor. In commits after 69785bf77f86e2ea1b4a20ca86775916889e91c9, 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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-39956?
CVE-2026-39956 is categorized as a high severity vulnerability due to its potential to cause crashes and memory disclosures.
How do I fix CVE-2026-39956?
To fix CVE-2026-39956, update jq to a version later than commit fdf8ef0f0810e3d365cdd5160de43db46f57ed03.
What impact does CVE-2026-39956 have on jq?
CVE-2026-39956 can lead to application crashes and limited memory disclosure when using the _strindices builtin.
Which versions of jq are affected by CVE-2026-39956?
jq versions from 69785bf77f86e2ea1b4a20ca86775916889e91c9 up to but not including fdf8ef0f0810e3d365cdd5160de43db46f57ed03 are affected.
Is there a workaround for CVE-2026-39956?
There is no known workaround for CVE-2026-39956; the recommended action is to update to a patched version.