CVE-2026-9856: Path Traversal in huggingface/transformers
Vulnerability summary
CVE-2026-9856 is a high (CVSS 7.1) vulnerability in huggingface huggingface/transformers. EPSS estimates a 0.46% chance of exploitation in the next 30 days, higher than 39.8% of scored vulnerabilities.
Not severe (CVSS 7.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 02-08-2026PublishedVulnerability first disclosed.
- 03-08-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · PypiEcosystem advisory · calculated7.1HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
- OSV · WolfiEcosystem advisory · calculated7.1HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
- OSV · ChainguardEcosystem advisory · calculated7.1HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
- NVDNIST7.1HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
EPSS trend
Probability
0.46%
Chance of exploitation in the next 30 days
Percentile
40%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.46% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard10 products
- open-webui< 0.11.3-r2
- py3.10-transformers-4.51All versions (No fix recorded)
- py3.10-transformers-4.56All versions (No fix recorded)
- py3.11-transformers-4.51All versions (No fix recorded)
- py3.11-transformers-4.56All versions (No fix recorded)
Huggingface1 product
- huggingface/transformers≥ unspecified, < 5.10.0
PyPI1 product
- transformers< 5.10.0
Wolfi1 product
- open-webui< 0.11.3-r2
4 vendors · 13 products