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

HuggingFace transformersライブラリのバージョン5.3.0未満のすべてのバージョンには、重大なリモートコード実行の脆弱性が存在します。この脆弱性により、攻撃者は悪意のある`config.json`ファイルを作成し、その中の`_attn_implementation_internal`フィールドに攻撃者が制御するHuggingFace HubリポジトリIDを設定できます。被害者が標準の`AutoModelForCausalLM.from_pretrained()` APIを使ってこのモデルをロードすると、ライブラリは攻撃者のリポジトリから任意のPythonコードをダウンロードし、被害者のOS権限で実行します。この問題は、設定属性の無検証な逆シリアル化、内部フィールドの不十分なサニタイズ、ダウンロードされたカーネルのサンドボックス外実行が原因です。この脆弱性は`trust_remote_code`セキュリティ機構を回避し、被害者に気付かれず、標準のドキュメント化された使用パターンを悪用するため非常に深刻です。ユーザーはこの問題を緩和するためにバージョン5.3.0以降にアップグレードすることを推奨します。

想定される影響 ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 
対策

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

公表日 2026年5月24日0:00
登録日 2026年6月8日11:48
最終更新日 2026年6月8日11:48
CVSS3.0 : 重要
スコア 7.8
ベクター CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
影響を受けるシステム
huggingface
transformers 5.3.0 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年06月08日]
  掲載
2026年6月8日11:48

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

A critical remote code execution vulnerability exists in all versions of the HuggingFace transformers library prior to version 5.3.0. The vulnerability allows an attacker to craft a malicious `config.json` file containing the `_attn_implementation_internal` field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard `AutoModelForCausalLM.from_pretrained()` API, the library downloads and executes arbitrary Python code from the attacker's repository with the victim's full OS privileges. This issue arises due to unfiltered deserialization of configuration attributes, insufficient sanitization of internal fields, and unsandboxed execution of downloaded kernels. The vulnerability bypasses the `trust_remote_code` security mechanism, is invisible to the victim, and exploits the standard documented usage pattern, making it particularly severe. Users are advised to upgrade to version 5.3.0 or later to mitigate this issue.

公表日 2026年5月24日23:16
登録日 2026年5月27日4:07
最終更新日 2026年5月27日5:06
関連情報、対策とツール
共通脆弱性一覧