漏洞与安全社区 / 第三方国际
CVE-2026-1839: HuggingFace Transformers allows for arbitrary code execution in the `Trainer` class
今日摘要使用自己的 API,仅供个人查看
来源摘要
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.
阅读原始来源- 来源
- Transformers 安全公告 · 社区 / 第三方
- 来源发布
- 2026/04/07 14:30
- 来源更新
- 2026/04/08 08:17
- 首次采集
- 2026/09/19 13:00
本文为公开信息索引与摘要,详情及后续变化请以原始来源为准。