Live threats

All CVEs / huggingface

CVE-2026-9856huggingface/transformers

High 7.1 No auth needed

Priority
58
CVSS 3.0
7.1
EPSS
—
Auth required
No
Published
Aug 2, 2026
Updated
Oct 23, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-22
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for huggingface/transformers.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI transformers < 5.10.0 5.10.0 pip install "transformers>=5.10.0"
PyPI transformers < 5.10.0 5.10.0 pip install "transformers>=5.10.0"

Per OSV / GitHub Advisories (GHSA-xrqw-3rrv-vx5w, PYSEC-2026-3929). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.