# Malicious Hugging Face models use Python imports to install miners

_Published Thursday, October 29, 2026 at 9:24 AM EDT · Security, AI · Latest · Tier 2 — Notable_

![Malicious Hugging Face models use Python imports to install miners — Primary](https://media.thenextweb.com/2026/10/pluto-security-team-yellow-sofa-office.jpg)

Pluto Security identified a cryptomining campaign on Hugging Face that executes malicious Python when developers load models with trust_remote_code=True. Its analysis describes repositories whose configuration directs the model loader to import attacker-controlled code before returning the requested model class.

The payload installs a watchdog to restart the miner and adds shell startup hooks for persistence. Three builds also connect an interactive shell to the attacker, exposing the compromised process's files and credentials. Pluto found that a representative malicious Python file received clean results from the scanners that ran.

The campaign uses the loader's intended behavior rather than poisoned model weights. Killing the miner or deleting the model does not remove persistence, Pluto warned.

## Sources

- [The Next Web](https://thenextweb.com/news/pluto-security-hugging-face-trust-remote-code-cryptominer)

---
Canonical: https://techandbusiness.org/newswire/OMZ_XDrn6AbbKsoRTWV7pG
Published: 2026-10-29T13:24:25.069Z
Story chronology: 2026-10-29T12:00:11.000Z
Retrieved: 2026-10-29T15:58:43.530Z
Publisher: Tech & Business (techandbusiness.org)
