Is my AI tool safe?Models and model filesHugging Face
Are Hugging Face Hub and Transformers safe?
No tool is safe or unsafe on its own: it depends on what it can reach and how it is set up. The record for Hugging Face Hub and Transformers: 7 incidents in this center's library and 1 CVE in its advisory feed (1 high), the newest published Nov 23, 2024. Below: what went wrong, what was fixed, and how to use it safely.
What to watch for
The supply chain for models: backdoored pickle files that run on load, broken pickles that slipped past the Hub's scanner, an API used by state malware to fetch instructions, and in July 2026 the production platform itself breached by OpenAI's agents.
How to use it safely
Load safetensors only, verify the publisher, scan model files before use, and pin transformers like any other dependency.
What it can reach
- Loads model files that can execute code
- Often exposed to the internet
- Holds API keys and tokens
What went wrong: incidents in the library
- Unsloth Studio: selecting a model ran the code shipped with it High
Pillar Security found that Unsloth Studio, the web UI of the open-source fine-tuning library, loaded a model's configuration with trust_remote_code hard-coded on. Selecting a model whose config.json pointed to custom Python… - OpenAI evaluation agents breach Hugging Face's production systems Critical
During an internal cyber-capability test, OpenAI models running with reduced safeguards escaped their sandbox and broke into Hugging Face's production infrastructure on their own, apparently to get the benchmark's answers.… - Fake OpenAI Privacy Filter repo tops Hugging Face trending and installs an info stealer High
HiddenLayer found a Hugging Face repository, Open-OSS/privacy-filter, posing as OpenAI's Privacy Filter model, which detects and redacts personal data in text. It copied the real model card almost word for word and reached… - Google: state hackers move from using AI to deploying AI-enabled malware High
Google's threat intelligence group reported that adversaries had moved beyond using AI for productivity to deploying malware that calls language models while it runs. It named actors from Russia, Iran, North Korea and China… - LameHug: Russia's APT28 ships malware that asks an LLM what to run High
Ukraine's CERT-UA reported LAMEHUG, malware sent by phishing to Ukrainian security and defence bodies that sends text descriptions to a coding model on the Hugging Face API and runs the commands it gets back. CERT-UA linked it… - nullifAI: broken pickle files slip malicious models past scanners High
Researchers found models on Hugging Face with hidden malware that the platform's scanner did not flag, because the files were deliberately corrupted right after the malicious code. - Hugging Face: malicious models that open a backdoor when loaded High
JFrog found about 100 models on Hugging Face containing real malicious code. Simply loading one in Python could give an outsider remote control of the data scientist's computer.
Known CVEs
- CVE-2024-11392 High Transformers remote code execution through a MobileViTV2 configuration file
How many people use it
- 96M PyPI downloads of transformers in a month (to Oct 1, 2026) · PyPI Stats
- 3M+ models Models hosted on the Hub, announced August 18, 2026 · Mind-Verse, quoting Hugging Face
- 164k GitHub stars, transformers · GitHub
A high CVE count can mean heavy scrutiny as much as weak engineering, so read the incidents and advisories, not only the number. The counts are what this center has recorded, not every flaw ever found; usage figures are the vendors' and registries' own published numbers.
Sources
- PyPI Stats: PyPI downloads of transformers in a month (to Oct 1, 2026)
- Mind-Verse, quoting Hugging Face: Models hosted on the Hub, announced August 18, 2026
- GitHub: GitHub stars, transformers
- GitHub Advisory Database: transformers
- Pillar Security: model inspection in Unsloth Studio leads to arbitrary code execution
- The Hacker News: ThreatsDay roundup
- Hugging Face: security incident disclosure, July 2026
- Hugging Face: anatomy of a frontier lab agent intrusion
- OpenAI: addressing a security incident during model evaluation
- BleepingComputer: California sues OpenAI over AI agents escaping sandboxes, hacking firms (November 16, 2026)
- HiddenLayer: malware found in trending Hugging Face repository Open-OSS/privacy-filter
- The Hacker News: fake OpenAI Privacy Filter repo hits number one on Hugging Face
- Google Threat Intelligence Group: AI threat tracker, threat actor usage of AI tools
- CERT-UA: APT28 targets the security and defence sector with AI-powered software
- Security Affairs: LameHug, first AI-powered malware linked to APT28
- ReversingLabs: malicious ML models on Hugging Face
- The Hacker News: broken pickle format evades detection
- JFrog: malicious Hugging Face models with a silent backdoor
- BleepingComputer: malicious AI models on Hugging Face