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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-80047— Hugging Face Transformers library writes remote code to disk prior to consent check

Quick assessment

Affected
Hugging Face 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 4.49.0版本至5.8.1版本存在安全漏洞,该漏洞源于在信任验证前无条件写入文件,可能导致未经用户同意将远程Python文件写入本地磁盘,并可能导致持久化未授权文件和缓存冲突,使缓存代码可能在后续可信模型加载时被执行。

AI Predicted 6.5 Difficulty: Moderate EPSS 0.10% · P1

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter

Affected Version Matrix 1

VendorProduct Version RangeStatus
Hugging Face Transformers 4.57.0≤ 5.16.1 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-80047

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
Hugging Face Transformers library writes remote code to disk prior to consent check
Source: CVE Program / CVE List V5
Vulnerability Description
A vulnerability in Hugging Face Transformers (versions 4.57.0 to 5.16.1) allows remote Python files to be written to local disk without user consent when using GenerativePreTrainedModel.load_custom_generate(). The function fetches and caches a remote module file before performing the required trust_remote_code consent check, inverting the security model enforced by other code-loading paths (such as AutoConfig, AutoModel, and AutoTokenizer). As a result, attacker‑controlled Python code from custom_generate/generate.py is copied into the user’s ~/.cache/huggingface/modules directory even if the user declines the trust prompt. Although execution is correctly gated, the file write is not reversible and can persist across sessions. This can lead to persistent, unauthorized files on disk and stale cache collisions where cached attacker code may later be executed during trusted model loads. The issue stems from an unconditional file write in dynamic_module_utils.py prior to any trust verification.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
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 4.49.0版本至5.8.1版本存在安全漏洞,该漏洞源于在信任验证前无条件写入文件,可能导致未经用户同意将远程Python文件写入本地磁盘,并可能导致持久化未授权文件和缓存冲突,使缓存代码可能在后续可信模型加载时被执行。
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
Hugging Face Transformers 4.57.0 ~ 5.16.1 -

II. Public POCs for CVE-2026-80047

# 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-80047

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

Vendor Advisories for CVE-2026-80047 (1)

Vendor Pages for CVE-2026-80047 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-80047

No comments yet


Leave a comment