CVE-2026-9856

HIGH
MEDIUM Priority: 0.03 BB Relevance: 64/100
Published: 2026-08-02 Modified: 2026-10-23 First seen: 2026-10-29 Status: active

Attack Surface

Network Low Complexity No Auth Integ. Impact

CVSS Vector Breakdown

AV: Network
AC: Low
PR: None
UI: Required
S: Unchanged
C: None
I: High
A: Low

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.

Weakness Classification (1)

Bug Bounty Relevance

64 / 100
✓ Network accessible
✓ No authentication
✓ Low complexity

CVSS Score

7.1 / 10.0 v3.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L

EPSS — Exploitation Probability

0.46%
Raw Score 0.004600
Percentile 39.8%
Date 2026-10-29

EPSS Trend

2026-10-29
0.00460
2026-10-28
0.00460

Intelligence Sources

nvd ref →