jqlangのjqにおける複数の脆弱性
タイトル jqlangのjqにおける複数の脆弱性
概要

jqはコマンドラインのJSONプロセッサです。バージョン1.8.1までにおいて、jvp_string_append()およびjvp_string_copy_replace_bad関数に整数オーバーフローの脆弱性が存在します。この脆弱性は、文字列の連結で合計長が2^31バイトを超えると、バッファ割り当てサイズの計算において32ビット符号なし整数のオーバーフローが発生し、結果として極端に小さいヒープバッファが割り当てられることに起因します。その後のメモリコピー操作で完全な文字列データを書き込むため、CWE-190(整数オーバーフロー)に分類されるヒープバッファオーバーフロー(CWE-122)が発生します。信頼されていないjqクエリを評価するシステムはすべて影響を受け、攻撃者は非常に大きな文字列を生成するクエリを作成することでプロセスをクラッシュさせたり、ヒープ破損によるさらなる攻撃を実行したりする可能性があります。根本原因は、配列やオブジェクトにはサイズ制限があるのに対し、文字列のサイズ制限のチェックがないことにあります。この問題はコミットe47e56d226519635768e6aab2f38f0ab037c09e5で修正されました。

想定される影響 当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 また、当該ソフトウェアが扱う情報について、書き換えは発生しません。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

公表日 2026年4月13日0:00
登録日 2026年4月24日11:31
最終更新日 2026年4月24日11:31
CVSS3.0 : 重要
スコア 7.5
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
jqlang
jq 1.8.1 およびそれ以前
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年04月24日]
  掲載
2026年4月24日11:31

NVD脆弱性情報
CVE-2026-32316
概要

jq is a command-line JSON processor. An integer overflow vulnerability exists through version 1.8.1 within the jvp_string_append() and jvp_string_copy_replace_bad functions, where concatenating strings with a combined length exceeding 2^31 bytes causes a 32-bit unsigned integer overflow in the buffer allocation size calculation, resulting in a drastically undersized heap buffer. Subsequent memory copy operations then write the full string data into this undersized buffer, causing a heap buffer overflow classified as CWE-190 (Integer Overflow) leading to CWE-122 (Heap-based Buffer Overflow). Any system evaluating untrusted jq queries is affected, as an attacker can crash the process or potentially achieve further exploitation through heap corruption by crafting queries that produce extremely large strings. The root cause is the absence of string size bounds checking, unlike arrays and objects which already have size limits. The issue has been addressed in commit e47e56d226519635768e6aab2f38f0ab037c09e5.

公表日 2026年4月14日3:16
登録日 2026年4月15日11:38
最終更新日 2026年4月23日1:29
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:jqlang:jq:*:*:*:*:*:*:*:* 1.8.1
関連情報、対策とツール
共通脆弱性一覧