REDHAT-BUG-2469187: Medium severity JQ jq vulnerability
jq is a command-line JSON processor. In 1.8.1 and earlier, the jq bytecode VM's data stack tracks its allocation size in a signed int. When the stack grows beyond ≈1 GiB (via deeply nested generator forks), the doubling arithmetic overflows. The wrapped value is passed to realloc and then used for a memmove with attacker-influenced offsets.
Affected Software
Event History
Frequently Asked Questions
What input is required to trigger the issue?
An attacker needs to cause jq to process input or filters that create deeply nested generator forks, growing the bytecode VM data stack beyond approximately 1 GiB. The resulting integer overflow affects the allocation size passed to realloc and subsequent memmove operations.
Are typical small JSON documents likely to trigger this vulnerability?
No. Triggering it requires unusually deep generator-fork behavior and data-stack growth beyond approximately 1 GiB, rather than ordinary small JSON processing.
How can I determine whether my jq version is affected?
Versions 1.8.1 and earlier are affected according to the available information. Check the jq version deployed in environments that process untrusted JSON or attacker-controlled jq filters.