CVE-2015-8863
CriticalSummary
Off-by-one error in the tokenadd function in jv_parse.c in jq allows remote attackers to cause a denial of service (crash) via a long JSON-encoded number, which triggers a heap-based buffer overflow.
Risk Assessment
Attackers can exploit this vulnerability to remotely crash the application, potentially leading to service downtime.
Recommendation
It is recommended to update jq to the latest version to mitigate this vulnerability and to monitor logs for potential attack attempts.
Other vulnerabilities in jq
See all- CVE-2016-4074High
The jv_dump_term function in jq 1.5 allows remote attackers to cause a denial of service via a crafted JSON file, leading to stack consumption and application crash. This issue has been fixed in jq 1.6_rc1-r0.
- CVE-2024-53427Medium
The decNumberCopy function in decNumber.c in jq through 1.7.1 does not properly consider that NaN is interpreted as numeric, which has a resultant stack-based buffer overflow and out-of-bounds write. This can be demonstrated by using --slurp with subtraction, such as a filter of .-. when the input has a certain form.
- CVE-2026-40164High
Before commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784, jq used MurmurHash3 with a hardcoded, publicly visible seed (0x432A9843) for all JSON object hash table operations, allowing an attacker to precompute key collisions offline. A crafted JSON object (~100 KB) with all keys hashing to the same bucket degrades lookups from O(1) to O(n), causing CPU exhaustion.
- CVE-2026-39979Medium
In the libjq library (part of the jq tool), the jv_parse_sized() function has an out-of-bounds read vulnerability. When processing malformed JSON in a non-NUL-terminated buffer, the error formatting function uses %s which reads until a NUL terminator, ignoring the caller-supplied length.
- CVE-2026-39956Medium
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.
Original NVD description (English source)
Off-by-one error in the tokenadd function in jv_parse.c in jq allows remote attackers to cause a denial of service (crash) via a long JSON-encoded number, which triggers a heap-based buffer overflow.

