製品・ソフトウェアに関する情報
jqlangのjqにおける境界外書き込みに関する脆弱性
Title jqlangのjqにおける境界外書き込みに関する脆弱性
Summary

jqはコマンドラインで使用するJSONプロセッサです。バージョン1.8.2以前のjqでは、`jq --rawfile`が処理済みのオーバーサイズ文字列エラーを無効な再利用状態に変え、アサーションが無効なビルドにおいて実際のヒープの境界外書き込みを引き起こす可能性があります。jv_load_file(raw=1)が攻撃者が制御するファイルを読み込む際、ファイルのチャンクを同じjv文字列アキュムレータに繰り返し追加します。jv_string_append_buf()がjv_invalid_with_msg("文字列が長すぎます")を返した後もraw-fileループは停止しません。ファイルに少なくとも1バイトでも残っている場合、次のループ反復で既に無効なオブジェクトに新しいチャンクが追加されます。アサーションが有効な場合はjvp_string_ptr()で中断しますが、アサーションが無効な場合は無効なオブジェクトが文字列オブジェクトとして解釈され、ASanはヒープバッファオーバーフローを報告します。この脆弱性はバージョン1.8.2で修正されました。

Possible impacts ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 
Solution

ベンダ情報を参照して適切な対策を実施してください。

Publication Date June 25, 2026, midnight
Registration Date June 29, 2026, 11:13 a.m.
Last Update June 29, 2026, 11:13 a.m.
CVSS3.0 : 重要
Score 7.1
Vector CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Affected System
jqlang
jq 1.8.2 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
Change Log
No Changed Details Date of change
1 [2026年06月29日]
  掲載
June 29, 2026, 11:13 a.m.

NVD Vulnerability Information
CVE-2026-49839
Summary

jq is a command-line JSON processor. Prior to 1.8.2,` jq --rawfile` can turn a handled oversized-string error into invalid-state reuse and a real heap out-of-bounds write in assertion-disabled builds. When jv_load_file(raw=1) reads an attacker-controlled file, it repeatedly appends file chunks to the same jv string accumulator. Once jv_string_append_buf() returns jv_invalid_with_msg("String too long"), the raw-file loop does not stop. If the file contains at least one more byte, the next loop iteration appends a new chunk to an object that is already invalid. With assertions enabled this aborts in jvp_string_ptr(). With assertions disabled, the invalid object is interpreted as a string object and ASan reports heap-buffer-overflow. This vulnerability is fixed in 1.8.2.

Publication Date June 26, 2026, 3:16 a.m.
Registration Date June 27, 2026, 4:29 a.m.
Last Update June 27, 2026, 3:53 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:jqlang:jq:*:*:*:*:*:*:*:* 1.8.2
Related information, measures and tools
Common Vulnerabilities List