製品・ソフトウェアに関する情報
huggingfaceのtransformersにおける信頼できない制御領域からの機能の組み込みに関する脆弱性
Title huggingfaceのtransformersにおける信頼できない制御領域からの機能の組み込みに関する脆弱性
Summary

huggingface/transformers バージョン 5.2.0 の LightGlue モデル読み込みパスに脆弱性が存在します。この脆弱性により、攻撃者が制御するモデルリポジトリがモデル初期化中に任意のコードを実行できる可能性があります。この問題は、リモートコード実行を防ぐためのパラメータである `trust_remote_code` が、信頼されていないシリアライズされた設定データによってネストされたコードパスで上書きされることに起因します。具体的には、`trust_remote_code=False` を指定して `AutoModel.from_pretrained()` で LightGlue モデルを読み込む際に、`LightGlueConfig` が信頼されていない `config.json` ファイルから `trust_remote_code` の値を読み取り、それがネストされた `AutoConfig.from_pretrained()` 呼び出しに伝播します。これにより、被害者が明示的にリモートコード実行を無効化していても、攻撃者が提供する Python モジュールが実行されてしまいます。この脆弱性は、API 推論サーバー、研究ノートブック、CI/CD パイプライン、モデル評価ワーカーなどの環境において高リスクをもたらし、認証情報の窃取や横移動、持続的なバックドア設置の可能性を孕んでいます。

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

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

Publication Date June 3, 2026, midnight
Registration Date June 8, 2026, 11:45 a.m.
Last Update June 8, 2026, 11:45 a.m.
CVSS3.0 : 緊急
Score 9.6
Vector CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Affected System
huggingface
transformers 5.2.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2026年06月08日]
  掲載
June 8, 2026, 11:45 a.m.

NVD Vulnerability Information
CVE-2026-5241
Summary

A vulnerability in the LightGlue model loading path of huggingface/transformers version 5.2.0 allows an attacker-controlled model repository to execute arbitrary code during model initialization. The issue arises because the `trust_remote_code` parameter, intended to prevent remote code execution, is overridden by untrusted serialized configuration data in a nested code path. Specifically, when loading a LightGlue model using `AutoModel.from_pretrained()` with `trust_remote_code=False`, the `LightGlueConfig` reads the `trust_remote_code` value from the untrusted `config.json` file and propagates it into nested `AutoConfig.from_pretrained()` calls. This results in the execution of attacker-provided Python modules, even when the victim explicitly disables remote code execution. The vulnerability poses a high risk for environments such as API inference servers, research notebooks, CI/CD pipelines, and model evaluation workers, potentially leading to credential theft, lateral movement, or persistence/backdoor deployment.

Publication Date June 3, 2026, 11:16 p.m.
Registration Date June 4, 2026, 4:16 a.m.
Last Update June 5, 2026, 3:54 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:huggingface:transformers:5.2.0:*:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List