Path Traversal Vulnerability in Hugging Face Transformers by Hugging Face
CVE-2026-9856

7.1HIGH

Key Information:

Vendor
CVE Published:
2 August 2026

What is CVE-2026-9856?

A vulnerability exists in Hugging Face Transformers that allows attackers to perform arbitrary file writes due to improper validation of filenames in the 'save_pretrained()' methods. When user input from the 'chat_template' dictionary is used directly as filenames, malicious actors can craft a harmful 'tokenizer_config.json' file within a Hugging Face Hub repository. This can lead to unauthorized file manipulations when the affected tokenizer or processor is downloaded and executed, impacting various processors that inherit from the 'ProcessorMixin', including Idefics, Florence, Gemma, Phi, and Qwen-VL.

Affected Version(s)

huggingface/transformers < 5.10.0

References

CVSS V3.0

Score:
7.1
Severity:
HIGH
Confidentiality:
None
Integrity:
High
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
Required
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.