If you download AI models from Hugging Face and run them locally, one setting matters more than the rest: trust_remote_code. Pluto Security tracked 31 malicious repositories across seven Hugging Face accounts, in two waves since September, and says the malicious code runs when the model is imported. Last checked: 29 Nov 2026.
This is a report from a security firm and a news outlet, not a Hugging Face notice. It’s also a month old. It’s useful today because the habit it points at, loading unreviewed model code, is still common.
What did researchers find?
Pluto Security, in a post dated 29 Oct 2026, counted 29,818 downloads across the 31 repositories, or 32,376 when linked models are included. The most downloaded, MENXIANGYU/qwen2-tiny, had 28,412 downloads by 28 Oct. BleepingComputer, reporting the same day, said “more than 28,000 times”.
Both sources say the numbers are downloads and not confirmed infections. How many machines were really hit isn’t known.
How did the models run code?
The code runs at import, through the trust_remote_code option. That option tells a library to run Python files shipped inside the model repository. Per the reports, it was a disguised cryptominer, and some versions opened a reverse shell, which gives the attacker remote access to the machine.
BleepingComputer said that at the time of writing Hugging Face had disabled access to that top model, while a copy named htt0118/qwen2-tiny was still live. We haven’t rechecked Hugging Face today, so don’t assume any of these repositories is gone.
How do you check a model before loading it?
- Look at the repository’s files. If the config has an auto_map entry, it points to custom .py files. Read those first.
- Only then decide whether to set trust_remote_code. The sources say review the code first, not that you must never use the option.
- Pin the exact revision you reviewed, so a later edit to the repository doesn’t change what you run.
- Run untrusted code with limited privileges and no production secrets.
People most at risk are developers who test many community models on the same laptop or server where their cloud keys and SSH keys live. Keep that machine separate from your experiments.
What if you already loaded one?
BleepingComputer’s advice: if you loaded a model with the flag set, treat the machine as compromised. Killing the miner process doesn’t remove its persistence, so removing the process alone is not enough.
Related reading: Ternary Bonsai 2.5 27B, a free local AI model if you download models, and the backdoored Claude Code VS Code extension for another developer-tool warning.
Source and verification
Checked against Pluto Security on 29 Nov 2026. Download figures and the status of the top model are also from BleepingComputer, as reported on 29 Oct 2026.
Get one useful update every day
Verified, short, free. Join our Telegram channel: t.me/asn_daily · Instagram: @asn_daily







