PT-2026-67349

CVE-2026-9856

·

Published

2026-08-02

·

Updated

2026-09-15

Description by

CVSS 3.1
7.1
High
MetricsAV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Name of the Vulnerable Software and Affected Versions huggingface/transformers versions prior to 5.8.0.dev0
Description An issue allows arbitrary file writes through path traversal, a technique used to access files and directories outside the intended folder. The flaw exists in the save pretrained() methods of PreTrainedTokenizerBase and ProcessorMixin, where keys from the chat template dictionary are used as filenames without proper validation. An attacker can exploit this by publishing a malicious Hugging Face Hub repository containing a crafted tokenizer config.json file. When a user downloads and saves the tokenizer or processor, the attacker-controlled keys can escape the save directory to write arbitrary content. This affects several processors inheriting from ProcessorMixin, such as Idefics, Florence, Gemma, Phi, and Qwen-VL.
Recommendations Update to a version later than 5.8.0.dev0. As a temporary workaround, restrict the use of the save pretrained() function when handling tokenizers or processors from untrusted sources.
Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Related identifiers
GHSA-XRQW-3RRV-VX5W
ECHO-230D-A6B3-D275
PYSEC-2026-3929
Found an issue in the description? Have something to add? Feel free to write us 👾