製品・ソフトウェアに関する情報
huggingfaceのtransformersにおける信頼できないデータのデシリアライゼーションに関する脆弱性
Title huggingfaceのtransformersにおける信頼できないデータのデシリアライゼーションに関する脆弱性
Summary

HuggingFace Transformersライブラリの`Trainer`クラスに存在する脆弱性により、任意のコードを実行可能です。`src/transformers/trainer.py`の3059行目にある`_load_rng_state()`メソッドは、`weights_only=True`パラメータなしで`torch.load()`を呼び出しています。この問題は、PyTorchバージョン2.6未満と組み合わせて使用される`torch=2.2`をサポートするすべてのライブラリのバージョンに影響します。なぜなら、これらのバージョンでは`safe_globals()`コンテキストマネージャーが保護を提供しないためです。攻撃者は悪意のあるチェックポイントファイル(例:`rng_state.pth`)を提供することでこの脆弱性を悪用し、読み込む際に任意のコードを実行できます。この問題はバージョンv5.0.0rc3で修正されました。

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

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

Publication Date April 7, 2026, midnight
Registration Date April 30, 2026, 12:17 p.m.
Last Update April 30, 2026, 12:17 p.m.
CVSS3.0 : 重要
Score 7.8
Vector CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Affected System
huggingface
transformers 5.0.0
transformers 5.0.0 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2026年04月30日]
  掲載
April 30, 2026, 12:17 p.m.

NVD Vulnerability Information
CVE-2026-1839
Summary

A vulnerability in the HuggingFace Transformers library, specifically in the `Trainer` class, allows for arbitrary code execution. The `_load_rng_state()` method in `src/transformers/trainer.py` at line 3059 calls `torch.load()` without the `weights_only=True` parameter. This issue affects all versions of the library supporting `torch>=2.2` when used with PyTorch versions below 2.6, as the `safe_globals()` context manager provides no protection in these versions. An attacker can exploit this vulnerability by supplying a malicious checkpoint file, such as `rng_state.pth`, which can execute arbitrary code when loaded. The issue is resolved in version v5.0.0rc3.

Publication Date April 7, 2026, 3:16 p.m.
Registration Date April 15, 2026, 11:28 a.m.
Last Update April 7, 2026, 11:16 p.m.
Related information, measures and tools
Common Vulnerabilities List