Malicious AI Models on Hugging Face Were Downloaded 2,428 Times. How to Check a Model Before You Run It A Malspark researcher found five malicious models among 3,273,389 public Hugging Face repositories scanned on 26 November, and the five had been downloaded 2,428 times. Two models hid a Windows trojan behind a chat template that instructed users to run a command line, while three Qwen3-based models carried a trigger-phrase instruction aimed at AI agents with shell access. Separately, JFrog reported a fake Llama model built and uploaded by an autonomous agent that exfiltrated environment variables and tokens to a public repository, with Hugging Face disabling the 13 repositories the same day. A developer downloads an "uncensored cyber" language model to try on a laptop. The first reply starts with a one-line command and a friendly instruction to run it. Plenty of people would copy it. That was the trap in two of five malicious AI models that a Malspark researcher found on Hugging Face, and by 27 November the five had been downloaded 2,428 times. In the same week, JFrog published a separate case. A fake Llama model, built by an autonomous AI agent, collected the secrets of the first machine that loaded it. That machine belonged to the agent. Below is what each group found, and the checks that would have stopped these models on your own machine. Malspark scanned all 3,273,389 public model repositories on Hugging Face on 26 November. Of those, five were malicious, and they came from two accounts. Malspark notes that Hugging Face counts downloads, not people, so the number of affected users is lower or equal. Two models from this account had 1,946 downloads. A Windows trojan sat at the end of each model file, in a spot the loaders never read. For days, however, nothing started it. On 26 November the uploader changed each model's chat template, which is the hidden text a runtime adds to every conversation. The new template told the model to open every reply with a command line. A user who copied and ran that line on Windows would have unpacked and started the trojan. Malspark says the trojan can take saved browser passwords, target wallet extensions, log keystrokes and mine Monero. Downloads made before 26 November hold the payload but not the trigger. Three models from this account had 482 downloads. They were Qwen3-based models aimed at security users. Their chat template hid an instruction that fired on a trigger phrase. An AI agent with permission to run shell commands would read it as an order to download and run a script. Malspark did not recover that script, so what it would have installed is unknown. The model was called llama-3.2-1b-tuned and appeared on 24 November. Every .bin file was about 2.5 KB, while a real 1B model weighs more than two gigabytes. When loaded, the code collected environment variables, tokens and host details. It then saved them to a public repository on the attacker's own Hugging Face account, so there was no outside server to block. The first batch of secrets arrived 14 seconds after the upload, and it came from the attacker's own machine. It exposed an OpenAI key, a database connection string and a task list that included a phishing server and probing of other hosts. JFrog assessed with high confidence that an agent running the ARTEX tool built, uploaded and tested the model. It could not say how much the agent decided and how much a human asked for, and it did not identify the operator. About five hours later the account came back under a new name with a model that had no weight files at all, only a config, a borrowed tokenizer and Python code. Hugging Face's scanner had flagged the first model's two pickle files as unsafe. The second model showed no warning. JFrog reported its 13 repositories on 24 November, and Hugging Face disabled them the same day. The two repositories the attacker set up to collect data were still empty, so JFrog saw no real victim report back. Malspark's post, dated 27 November, says its five models were still online. We could not confirm whether they have been removed since, so check before you rely on that. Malspark's headline says "2400+ Victims", but its text counts downloads, not people, and describes no confirmed infection. That is not proof that nobody ran the models. Take a freelance developer, Priya, who maintains WordPress sites for six clients. She wants a local model to review code. She finds a promising repository and works through a list before she downloads anything. .bin files is not holding weights. Neither is a repository with Python files and no weight files at all. Either one would have ended her search. config.json for an auto map entry. trust remote code=True , that code runs before any weights load. For that reason, JFrog says to leave that flag off for repositories you have not reviewed. A safe load pins a full commit hash instead of a branch name and keeps remote code off: AutoModel.from pretrained "owner/model", revision="