Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-4372— Arbitrary Remote Code Execution via `_attn_implementation_internal` Config Injection in huggingface/transformers

Quick assessment

Affected
huggingface huggingface/transformers
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Hugging Face Transformers是Hugging Face开源的一个用于定义最先进机器学习模型的框架,涵盖文本、视觉、音频和多模态模型,可用于推理和训练。 Hugging Face Transformers 5.3.0之前版本存在安全漏洞,该漏洞源于配置属性的未过滤反序列化、内部字段清理不足以及下载内核的未沙箱执行,可能导致攻击者通过特制的config.json文件在受害者加载模型时下载并执行任意Python代码,绕过trust_remote_code安全机制。

AI Predicted 9.8 Difficulty: Trivial EPSS 0.60% · P47

Affected Version Matrix 1

VendorProduct Version RangeStatus
huggingface huggingface/transformers unspecified< 5.3.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-4372

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Arbitrary Remote Code Execution via `_attn_implementation_internal` Config Injection in huggingface/transformers
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
缺少序列化控件元素
Source: CVE Program / CVE List V5
Vulnerability Title
Hugging Face Transformers 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Hugging Face Transformers是Hugging Face开源的一个用于定义最先进机器学习模型的框架,涵盖文本、视觉、音频和多模态模型,可用于推理和训练。 Hugging Face Transformers 5.3.0之前版本存在安全漏洞,该漏洞源于配置属性的未过滤反序列化、内部字段清理不足以及下载内核的未沙箱执行,可能导致攻击者通过特制的config.json文件在受害者加载模型时下载并执行任意Python代码,绕过trust_remote_code安全机制。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
huggingface huggingface/transformers unspecified ~ 5.3.0 -

II. Public POCs for CVE-2026-4372

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-4372

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-4372 (1)

Vendor Advisories for CVE-2026-4372 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-4372

No comments yet


Leave a comment