Hugging Face Malware Campaign Returns to Hijack GPUs for Crypto Mining

Security researchers at Pluto Security discover 31 malicious repositories across seven Hugging Face accounts, published in two waves since September. The models pose as small Qwen2 test checkpoints and target GPU hosts running self-hosted inference servers such as Xinference and GPUStack. The campaign abuses Hugging Face's trust_remote_code option, which lets a model ship its own Python code that runs on a user's machine as soon as the model loads. The most downloaded model, MENXIANGYU/qwen2-tiny, contains no actual model at all; its code quietly installs a cryptocurrency miner disguised as a Linux system process, restarts it if killed, removes competing miners, and in some versions opens a reverse shell giving attackers direct server access.

After Pluto reports the first wave, Hugging Face and China's ModelScope remove the accounts, but a second wave of 19 repositories appears under new accounts within days. Hours after Pluto reports the second wave, the operator publishes another model with a script capable of breaking out of a container and taking over the underlying server. The second-wave repositories remain live eight days after the report, while downloads of the flagship model climb from 7,354 to 28,412 by October 28. Hugging Face has since disabled access to that model, but a near-identical copy uploaded by a newer account is still live and contains the same miner and reverse shell.

Separately, researchers flag a fake Solana starter kit on GitHub, live since late 2025, that is positioned to trick AI coding agents into installing a remote access trojan. The back-to-back campaigns highlight how attackers increasingly target AI development infrastructure, exploiting both the trust users place in model repositories and the growing reliance on automated coding agents to pull and run code. Developers are urged to scrutinize repository provenance and avoid enabling remote code execution for unverified models.

Read More at the original source →