Skip to main content
VulnerabilityPublished

CVE-2026-9856: huggingface/transformers · Path Traversal

Affects huggingface/transformersSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 7.1 High.

Data as of 31 Oct 2026, 08:20 UTC

CVSS 3.0 base score
7.1High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.4% chance of exploitation in 30 days – higher than 39% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 2 Aug 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Affected software

ProductAffectedFixed in
huggingfacehuggingface/transformersAffected
  • ≥ unspecified, < 5.10.0
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Until an official fix is available, avoid downloading and saving tokenizers or processors from untrusted or unverified Hugging Face Hub repositories, especially those that may contain malicious tokenizer_config.json files. Monitor vendor channels for updates and apply patches promptly once released.

Description

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.

References

Community reviews

Loading reviews…