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="<commit-sha>", trust_remote_code=False)
weights_only=True. In addition, render chat templates only in a sandbox.--chat-template-file in llama.cpp or TEMPLATE in an Ollama Modelfile. Its open-source tool gguf-radar can also scan a GGUF file without running it. However, we have not tested that tool. One more rule needs no tooling. Malspark says to treat any command a model suggests as untrusted, so Priya never pastes one into a terminal.
If you already ran such a line on Windows, assume the saved browser passwords on that machine are exposed. The sources do not set out an incident response, so this is our general advice. First, take the machine off the network. Then, from a different, clean device, change the passwords that were saved on it, and move any crypto funds.
The Mir2k trojan went after browser-saved passwords. Likewise, the JFrog collector read environment variables. Both are places where a developer keeps the keys to a website, such as the hosting panel, the CMS admin, the domain registrar and deploy tokens. If one freelancer or one agency laptop maintains your site, a poisoned model on that machine is a path to your site.
The agent's own task list also shows automated attackers working on several jobs at once, including a phishing server and probes of other hosts. We wrote earlier about a malicious npm package that stole .env files and about what happens when a password manager holding every login for your site gets hacked. Ask whoever runs your site two questions. Which machines hold its logins? And which models and tools do they download onto them?
A website scan cannot look inside a laptop, and it does not scan AI models. It shows what the outside world can see of the site those logins protect.
You can run a free external website security scan on a domain you own or have explicit permission to test. It only takes 7 minutes to know. If it finds problems, here is what to do after a website scan finds problems.
Not as far as the sources show. JFrog saw no real victim data reach the attacker's repositories. Malspark's headline says "2400+ Victims", but its text counts downloads, not people, and describes no confirmed infection.
JFrog confirmed that its 13 repositories were disabled on 24 November. However, Malspark said its five were still online on 27 November. Check the repository pages for current status.
It helps with one trick. Malspark says the safetensors loader refuses files that contain bytes after the last tensor. Chat templates, auto_map code and trust_remote_code still apply, so run the same checks.
原文来源:dev.to