Every CVE Search/ Get API key

CVE-2026-9856

Path Traversal in huggingface/transformers

7.1 HighFix available

CVE-2026-9856 is a high vulnerability (CVSS 7.1) in Huggingface Huggingface/transformers, published August 2, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.46%, the 39th percentile. Fixed in transformers 5.10.0.

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
High
Availability
Low

Exploit likelihood

0.46%Up 0.2 points since Aug 3, 2026
90%50%10%1%

What each source reports

CVE List Score used 7.1

Path Traversal in huggingface/transformers

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.

Record
CVE-2026-9856
CVSS 3.0
7.1 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Weakness
CWE-22
Updated
2026-11-02
EUVDEUVD-2026-52005 7.1

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.

Record
EUVD-2026-52005
CVSS 3.0
7.1 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-xrqw-3rrv-vx5w 7.1

Transformers save_pretrained path traversal allows arbitrary file writes through chat template names

A vulnerability in huggingface/transformers versions < 5.10.0 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.

Record
GHSA-xrqw-3rrv-vx5w
CVSS 3.0
7.1 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Weakness
CWE-22
Updated
2026-11-02
NVD 7.1

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.

Record
CVE-2026-9856
CVSS 3.0
7.1 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Weakness
CWE-22
Updated
2026-11-02
OSV 7.1

Path Traversal in huggingface/transformers

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.

Record
CVE-2026-9856
CVSS 3.0
7.1 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Weakness
CWE-22
Updated
2026-11-02
OSVGHSA-xrqw-3rrv-vx5w 7.1

Transformers save_pretrained path traversal allows arbitrary file writes through chat template names

A vulnerability in huggingface/transformers versions < 5.10.0 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.

Record
GHSA-xrqw-3rrv-vx5w
CVSS 3.0
7.1 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Weakness
CWE-22
Updated
2026-11-02
OSVPYSEC-2026-3929 7.1

Transformers save_pretrained path traversal allows arbitrary file writes through chat template names

A vulnerability in huggingface/transformers versions < 5.10.0 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.

Record
PYSEC-2026-3929
CVSS 3.0
7.1 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Updated
2026-11-02
OSVCLSA-2026-1788512070 No score

TuxCare security update for transformers (1 CVE)

TuxCare rebuilt transformers to address 1 CVE. Fixed in 4.57.6.post4+tuxcare.

Record
CLSA-2026-1788512070
Updated
2026-11-02
OSVROOT-APP-PYPI-CVE-2026-9856 No score

CVE-2026-9856 in transformers - Patched by Root

Root has patched CVE-2026-9856 in the transformers package for Root:PyPI. Multiple fixed versions available.

Record
ROOT-APP-PYPI-CVE-2026-9856
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
transformers
PyPI
before 5.10.0
5.10.0
transformers
TuxCare:PyPI
4.57.6 up to 4.57.6.post4+tuxcare, plus listed versions
4.57.6.post1+tuxcare4.57.6.post2+tuxcare4.57.6.post3+tuxcare
4.57.6.post4+tuxcare
transformers
PyPI
before 5.10.0, plus listed versions
0.12.0.02.1.02.1.12.10.0
Show 45 moreShow less
2.11.02.2.02.2.12.2.22.3.02.4.02.4.12.5.02.5.12.6.02.7.02.8.02.9.02.9.13.0.03.0.13.0.23.1.03.2.03.3.03.3.13.4.03.5.03.5.14.0.04.0.0rc14.0.14.1.04.1.14.10.04.10.14.10.24.10.34.11.04.11.14.11.24.11.34.12.04.12.14.12.24.12.34.12.44.12.54.13.04.14.0
5.10.0
transformers
Root:PyPI
before 5.8.1+aikido.1
5.8.1+aikido.1

History

History
WhenChangedSources
2026-11-02createdCVE List, EUVD, GitHub Advisories, NVD, OSV

References

This page doesn't list everything

Left out here: 176 versions. The JSON record has them.

MoveEnter Open