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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-9856— Path Traversal 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.8.0.dev0及之前版本存在路径遍历漏洞,该漏洞源于save_pretrained()方法中chat_template字典键未经验证直接用作文件名,可能导致路径遍历,攻击者能够写入任意文件。

AI Predicted 8.2 Difficulty: Easy EPSS 0.46% · P38

Affected Version Matrix 1

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

I. Basic Information for CVE-2026-9856

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
Path Traversal in huggingface/transformers
Source: CVE Program / CVE List V5
Vulnerability Description
A vulnerability in huggingface/transformers versions <=5.8.0.dev0 allows an attacker to perform arbitrary file writes via path traversal. The issue resides in the `save_pretrained()` methods of `PreTrainedTokenizerBase` and `ProcessorMixin`, where keys from the `chat_template` dictionary are used directly as filenames without proper validation. An attacker can exploit this by publishing a malicious Hugging Face Hub repository with a crafted `tokenizer_config.json` file. When a victim downloads and saves the tokenizer or processor, the attacker-controlled keys can escape the intended save directory, enabling arbitrary file writes with attacker-controlled content. This vulnerability affects multiple processors inheriting from `ProcessorMixin`, including Idefics, Florence, Gemma, Phi, and Qwen-VL.
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.8.0.dev0及之前版本存在路径遍历漏洞,该漏洞源于save_pretrained()方法中chat_template字典键未经验证直接用作文件名,可能导致路径遍历,攻击者能够写入任意文件。
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.10.0 -

II. Public POCs for CVE-2026-9856

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

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

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

Vendor Advisories for CVE-2026-9856 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-9856

No comments yet


Leave a comment