CVE-2026-9856
Last modified
CVE-2026-9856 is a high-severity vulnerability rated 7.1/10 on the CVSS scale. 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. EPSS estimates a 0.29% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| huggingface | huggingface/transformers | < 5.10.0 |
References
Timeline
- Published
- Last Modified
- Status
- Received
Frequently Asked Questions
What is CVE-2026-9856?
How severe is CVE-2026-9856?
How do I fix CVE-2026-9856?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-9838The ICS Calendar plugin for WordPress is vulnerable to Refle…6.1
- CVE-2026-9842The Backstage - Customizer Demo Access plugin for WordPress …7.5
- CVE-2026-9843The Database for Contact Form 7, WPforms, Elementor forms pl…8.1
- CVE-2026-9844Use of default credentials vulnerability in Roche Diagnostic…8.8
- CVE-2026-9848The WP Ticket plugin for WordPress is vulnerable to SQL Inje…7.5
- CVE-2026-9851The Booking Package plugin for WordPress is vulnerable to Pr…7.2
- CVE-2026-9857The Invoice123 plugin for WordPress is vulnerable to authori…4.3
- CVE-2026-9860The Offload, AI & Optimize with Cloudflare Images plugin for…8.8
- CVE-2026-9862Fortra's Core Privileged Access Manager (BoKS) contains an …9.8
- CVE-2026-9863Fortra BoKS Manager contains an OS command injection vulnera…8.8
- CVE-2026-9872Out of bounds write in GPU in Google Chrome on Android prior…9.6
- CVE-2026-9873Use after free in Network in Google Chrome prior to 148.0.77…8.8
Are you affected by CVE-2026-9856?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
