---
title: "Hugging Face Load/Mine Campaign - trust_remote_code Models That Mine Crypto on GPU Hosts"
description: "Pluto Security's Load/Mine: 31 fake Qwen2 repos on Hugging Face ran a miner and backdoor via trust_remote_code. What it does and how to check your hosts."
url: "https://anomity.ai/blog/hugging-face-load-mine-trust-remote-code-cryptominer-campaign/"
source: html
---

Hugging Face Load/Mine Campaign - trust_remote_code Models That Mine Crypto on GPU Hosts

Contents

- What happened
- How trust_remote_code turns a download into code execution
- What the payload does
- Why platform scanning missed it
- What to do
- Why this is an agentic-endpoint risk
- How Anomity helps
- What to check across your fleet
- Frequently asked questions

0%

7 min read

Share

- X.com

- LinkedIn

- Email

- Copy URL

- Copy markdown

[← Back to blog](https://anomity.ai/blog/)

- Home

- Blog

- Hugging Face Load/Mine Campaign - trust_remote_code Models That Mine Crypto on GPU Hosts

![Anomity robot illustrating Hugging Face Load/Mine Campaign - trust_remote_code Models That Mine Crypto on GPU Hosts]

Advisory High

# Hugging Face Load/Mine Campaign - trust_remote_code Models That Mine Crypto on GPU Hosts

Anomity Research
Anomity Threat Research
·
Oct 31, 2026
·
7 min read

Share: Copied

AI Supply-Chain Attacks · High · Load/Mine, disclosed by Pluto Security on October 29, 2026 (no CVE; campaign) · Oct 31, 2026

Affected Any machine that loaded one of the campaign's Hugging Face or ModelScope repositories with trust_remote_code enabled - in practice GPU hosts running self-hosted inference servers such as Xinference and GPUStack. Pluto counts 31 repositories across seven Hugging Face accounts plus a ModelScope mirror, and a second wave of 19 repositories under new accounts.

**Load/Mine** is a malware campaign that used Hugging Face as its delivery network. Pluto Security published its analysis on **October 29, 2026**: dozens of repositories dressed up as small **Qwen2** test models that, when loaded with **trust_remote_code** enabled, installed a disguised cryptominer and, in some builds, an SSH backdoor. The targets were the machines most worth stealing compute from - **GPU hosts running self-hosted inference servers**. This advisory covers how the campaign works, why platform scanning missed it, what to check, and where it touches the AI tooling on your own fleet.

## What happened

Pluto counts **31 malicious repositories across seven Hugging Face accounts**, plus a mirror on Alibaba's **ModelScope** hub. Together they recorded **29,818 downloads**, or **32,376** counting 13 linked repositories. Pluto stresses that these are download counts, not confirmed infections: automated pipelines and mirrors download models too. The flagship, **MENXIANGYU/qwen2-tiny**, accounted for about **28,400** of those downloads and **contained no real model at all**. Hugging Face has since disabled access to it.

Pluto reported the first wave to Hugging Face and ModelScope, and both removed the accounts. Within days, a **second wave of 19 repositories** appeared under new accounts, and Pluto says it stayed live for at least eight days after being reported. BleepingComputer found a near-identical copy uploaded on October 25 by a newer account still live when it wrote its story. Pluto attributes the campaign to a **financially motivated, Chinese-speaking operator**; reporting puts the operator's take at roughly **2,276 PRL, about $5,000**.

Claim Status

31 repositories across seven Hugging Face accounts, plus a ModelScope mirror Pluto's count

29,818 downloads (32,376 with linked repos) Pluto's count; downloads, not infections

Nine machines on an apparently shared research GPU cluster mined for the operator Observed by Pluto

First-wave accounts removed by Hugging Face and ModelScope Reported by Pluto

A second wave of 19 repositories appeared under new accounts Reported by Pluto and BleepingComputer

Operator earned about $5,000 in Pearl (PRL) Reported; based on wallet receipts

How many hosts are still infected Unknown

## How trust_remote_code turns a download into code execution

Hugging Face Transformers lets a model repository ship its own Python classes for architectures the library does not know. The repository's `config.json` carries an **auto_map** entry that names those classes, and when a caller passes **trust_remote_code=True**, Transformers downloads the referenced `.py` files and imports them. Importing a Python module runs it. So the attacker's code executes during the load call, **before any weights are read** - which is why a repository with no real model in it works perfectly well as a dropper.

None of this is a vulnerability. It is the documented behaviour of the flag, and the flag exists because many legitimate new architectures need it. Inference servers that load arbitrary models by name, such as **Xinference** and **GPUStack**, often enable it so a user can serve whatever they point at. That is what made them the target: an operator trying a "tiny Qwen2 for testing" on a GPU host hands the repository the same privileges as the server process. It is also the same flag behind a run of serving-engine bugs, including the [vLLM trust_remote_code bypass](https://anomity.ai/blog/vllm-trust-remote-code-bypass-rce-cve-2026-27893/), where the server set it to true without being asked.

## What the payload does

Pluto traced the campaign from a single file, a **305-line modeling_evil.py** under a random-string account name that matched for `subprocess`, `socket`, `ctypes` and `memfd_create`. Later builds were quieter, using ordinary names such as `Qwen2Config` and `modeling_qwen2.py`. Across the waves, Pluto describes:

- A miner Pluto identifies as peakminer , mining Pearl (PRL) against attacker pools, which suits GPU hosts.
- A fileless launch through memfd_create , so the miner binary never sits on disk under its own name, with the process renamed to look like a kernel worker thread, [kworker/u20:1] .
- In wave one, an install under /root/.xinference/cache , a directory an Xinference operator expects to be full of large files.
- A backdoor variant Pluto calls qwen2-shell , which writes an Ed25519 key into authorized_keys and beacons to a server on Alibaba Cloud, and in some builds a reverse shell.
- Iteration between waves: Pluto describes the operator revising the loader as detections landed, and says the second-wave flagship scanned clean .

The SSH key is the part that outlasts the miner. A host that stops mining because the repo was deleted, or because the loader crashed, can still carry the attacker's key.

## Why platform scanning missed it

Hugging Face scans uploads with antivirus engines and with partner scanners from **Protect AI** and **JFrog**. Those checks look for known malware signatures and unsafe serialization formats such as pickle. They do not judge what a repository's own Python does when imported, and they cannot: a modeling file that opens a socket or calls `subprocess` is unusual, but not proof of malice. A loader written to avoid known signatures passes, and the platform's "safe" label describes the weights format, not the code that runs before them. Removing accounts works, but the second wave shows the cost to the operator of a takedown is a new account name.

## What to do

- Find who loads remote code. List the inference servers you run (Xinference, GPUStack, vLLM, Text Generation Inference and similar), whether each allows trust_remote_code , and which models it has pulled. Search for trust_remote_code=True in notebooks, scripts and pipelines.
- Check for the campaign's models. Look in Hugging Face and ModelScope caches for small Qwen2-style repositories from unfamiliar accounts, starting with MENXIANGYU/qwen2-tiny , and for a modeling_evil.py anywhere in a model cache.
- Check hosts that loaded one, even if the load failed. Look for unexpected entries in authorized_keys , processes named like [kworker/u20:1] that are not real kernel threads (a kernel thread has no executable path), anonymous memfd: executables, unexpected files under /root/.xinference/cache , and outbound connections to mining pools. Pluto warns that normal-looking GPU use does not clear a host.
- Rebuild and rotate. Rebuild a compromised host rather than cleaning it. Rotate every credential it could reach: Hugging Face tokens, cloud credentials, SSH keys and the provider API keys an inference box often holds.
- Change the default. Leave trust_remote_code off, and before turning it on for a repository, read every .py file its auto_map names. Pin a reviewed revision (a commit hash, not a branch) so the code cannot change under you.
- Constrain the server. Run inference servers as an unprivileged user in a container with restricted egress, so a loader that does run cannot reach a mining pool or open a tunnel.

## Why this is an agentic-endpoint risk

The direct targets were GPU servers, but the habit Load/Mine exploits starts on laptops. A developer who wants to try a model runs a one-line load in a notebook, or asks a coding agent to "spin up a small Qwen model to test against" and lets it run the command. The agent copies whatever example it finds, and the examples for unfamiliar architectures say `trust_remote_code=True`. The same laptop holds Hugging Face tokens, cloud credentials and AI provider keys - the material that turns a free GPU into [stolen inference spend](https://anomity.ai/blog/llmjacking-stolen-key-cost-abuse/) once it leaks. Load/Mine is one more campaign in the pattern the [AI supply-chain defender's guide](https://anomity.ai/blog/ai-supply-chain-attacks-defenders-guide/) tracks: trusted registry, attacker code, run at load time.

## How Anomity helps

Anomity's Endpoint Sensor covers the managed-laptop half of this. It inventories **local LLM runtimes** on each endpoint, alongside the AI agents, MCP servers, extensions, skills, hooks and CLIs, so you know which developers run models locally and with what. It also finds **Hugging Face tokens** among the secrets on each machine, with values redacted on the endpoint, which gives you the rotation list for any machine that may have loaded a campaign model.

On agents that expose a hook, such as **Claude Code PreToolUse**, Anomity returns **allow, deny or log** on each tool call before it runs. A policy can log or deny an agent's shell commands that load a model with `trust_remote_code=True`, or that pull from an unreviewed hub account, so an agent cannot quietly make that choice for a developer. Every decision lands in the [90-day audit trail](https://anomity.ai/#outcomes) and routes to your SIEM, Slack, email or Jira.

The limits matter here. Anomity does not scan model repositories, and it covers the machines its sensors are installed on, not shared GPU servers it does not run on. Xinference and GPUStack are not in its runtime inventory today. Container hardening, egress control and EDR on the GPU hosts remain the controls for the servers themselves; Anomity **complements** them by covering the developer endpoints and agents that choose which models to load.

> You can't govern what you can't see. The Anomity principle

## What to check across your fleet

- Every inference server: does it allow trust_remote_code , and which repositories has it pulled in recent weeks?
- Model caches on servers and laptops: any MENXIANGYU/qwen2-tiny , any modeling_evil.py , any tiny Qwen2 test models from accounts nobody recognises.
- Hosts that loaded one: authorized_keys , fake [kworker] processes, memfd: executables, /root/.xinference/cache , outbound mining traffic.
- Which developer machines hold Hugging Face tokens, and which run local LLM runtimes.
- Whether coding agents may run model-loading commands unreviewed, and whether those commands are logged at the hook.
- For the serving-engine side, the LightLLM pickle deserialization RCE , the other common way a model server runs attacker code.

Load/Mine needed no exploit: it used a documented flag, a free hosting platform and the habit of loading a small test model without reading its code. Check the hosts that pulled campaign repositories, rotate what they could reach, and make `trust_remote_code` a reviewed decision rather than a default. To see which of your developers run local models and hold hub tokens, [book a 30-minute demo](https://anomity.ai/#early-access).

Share: Copied

## Frequently asked questions

What is the Hugging Face Load/Mine malware campaign?
Load/Mine is a campaign Pluto Security disclosed on October 29, 2026, in which 31 model repositories across seven Hugging Face accounts, plus a ModelScope mirror, posed as small Qwen2 test models. When loaded with trust_remote_code enabled, they ran bundled Python that installed a disguised cryptominer mining Pearl (PRL) and, in some builds, an SSH backdoor or reverse shell. The targets were GPU hosts running self-hosted inference servers such as Xinference and GPUStack.

Is loading a Hugging Face model with trust_remote_code dangerous?
It runs the repository's own Python code on your machine with the privileges of the loading process, before any weights are read. That is the documented purpose of the flag, so it is only as safe as the code in the repository. Leave it off by default, read every Python file the repository's auto_map points to before enabling it, and pin a reviewed commit so the code cannot change after you read it.

Why didn't Hugging Face's malware scanning catch these models?
Hugging Face's antivirus and partner scanners from Protect AI and JFrog look for known malware signatures and unsafe file formats such as pickle. They do not judge what a repository's custom Python does when it is imported. The campaign's loaders avoided known signatures, and Pluto says the second-wave flagship scanned clean.

How do I check whether a machine was infected?
Check model caches for the campaign's repositories, starting with MENXIANGYU/qwen2-tiny, and for any modeling_evil.py. On a host that loaded one, look for unexpected keys in authorized_keys, processes named like [kworker/u20:1] that are not real kernel threads, anonymous memfd executables, files under /root/.xinference/cache, and outbound mining traffic. Pluto advises treating a host as compromised even if the load failed or GPU use looks normal, and rotating every credential it could reach.

How does Anomity help with this?
Anomity's Endpoint Sensor inventories local LLM runtimes and AI agents on managed endpoints and finds Hugging Face tokens among each machine's secrets, with values redacted on the endpoint, so you know who runs models locally and what to rotate. On agents with a hook, such as Claude Code PreToolUse, it can log or deny model-loading commands that enable trust_remote_code. It does not scan model repositories or cover GPU servers without a sensor, so it complements container hardening, egress control and EDR on those hosts.

## Related posts

[Advisory Critical ### Hades PyPI Campaign Poisons 19 Packages with .pth Startup Hooks - Bun Credential Stealer and AI Scanner Misdirection The Hades wave shipped 37 malicious wheels across 19 PyPI packages using *-setup.pth startup hooks that run a Bun credential stealer on every Python run. Anomity Research · Jun 8, 2026 · Hades campaign (Miasma lineage; no single CVE)](https://anomity.ai/blog/hades-pypi-pth-bun-credential-stealer/)

[Advisory High ### TrapDoor Cross-Ecosystem Supply-Chain Attack - Credential Theft and AI Assistant Poisoning Across npm, PyPI and Crates.io TrapDoor, disclosed May 2026, spread credential-stealing malware across 34+ packages and 384+ versions on npm, PyPI, and Crates.io and poisoned AI agents. Anomity Research · May 22, 2026 · TrapDoor campaign (no single CVE)](https://anomity.ai/blog/trapdoor-cross-ecosystem-credential-stealer-npm-pypi-crates/)

[Advisory Critical ### Shai-Hulud 2.0 npm Worm Backdoors 796 Packages - Preinstall Credential Theft and Home-Directory Wiper Shai-Hulud 2.0, identified November 24 2025, is a self-replicating npm worm that backdoored 796 packages and runs a credential stealer during preinstall. Anomity Research · Nov 24, 2025 · Shai-Hulud 2.0 (no single CVE; npm supply-chain worm campaign)](https://anomity.ai/blog/shai-hulud-2-npm-worm-credential-stealer/)

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "Hugging Face Load/Mine Campaign - trust_remote_code Models That Mine Crypto on GPU Hosts",
  "description": "Pluto Security's Load/Mine: 31 fake Qwen2 repos on Hugging Face ran a miner and backdoor via trust_remote_code. What it does and how to check your hosts.",
  "datePublished": "2026-10-31",
  "dateModified": "2026-10-31",
  "author": {
    "@type": "Organization",
    "name": "Anomity",
    "url": "https://anomity.ai/",
    "sameAs": [
      "https://www.linkedin.com/company/anomity",
      "https://github.com/Anomity-ai",
      "https://www.wikidata.org/wiki/Q140763940"
    ]
  },
  "publisher": {
    "@type": "Organization",
    "name": "Anomity",
    "url": "https://anomity.ai/",
    "sameAs": [
      "https://www.linkedin.com/company/anomity",
      "https://github.com/Anomity-ai",
      "https://www.wikidata.org/wiki/Q140763940"
    ],
    "logo": {
      "@type": "ImageObject",
      "url": "https://anomity.ai/anomity-logo.png"
    }
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://anomity.ai/blog/hugging-face-load-mine-trust-remote-code-cryptominer-campaign/",
    "relatedLink": [
      "https://anomity.ai/blog/hades-pypi-pth-bun-credential-stealer/",
      "https://anomity.ai/blog/trapdoor-cross-ecosystem-credential-stealer-npm-pypi-crates/",
      "https://anomity.ai/blog/shai-hulud-2-npm-worm-credential-stealer/"
    ]
  },
  "image": {
    "@type": "ImageObject",
    "url": "https://anomity.ai/assets/blog/covers/prompt-injection.jpg",
    "width": 1200,
    "height": 630
  },
  "articleSection": "AI Supply-Chain Attacks",
  "wordCount": 1495,
  "timeRequired": "PT7M",
  "inLanguage": "en",
  "url": "https://anomity.ai/blog/hugging-face-load-mine-trust-remote-code-cryptominer-campaign/",
  "keywords": "Hugging Face trust_remote_code malware, Load/Mine, disclosed by Pluto Security on October 29, 2026 (no CVE; campaign), Hugging Face, trust_remote_code, cryptominer, supply chain, self-hosted inference, Xinference, GPUStack, ModelScope, agentic AI security"
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is the Hugging Face Load/Mine malware campaign?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Load/Mine is a campaign Pluto Security disclosed on October 29, 2026, in which 31 model repositories across seven Hugging Face accounts, plus a ModelScope mirror, posed as small Qwen2 test models. When loaded with trust_remote_code enabled, they ran bundled Python that installed a disguised cryptominer mining Pearl (PRL) and, in some builds, an SSH backdoor or reverse shell. The targets were GPU hosts running self-hosted inference servers such as Xinference and GPUStack."
      }
    },
    {
      "@type": "Question",
      "name": "Is loading a Hugging Face model with trust_remote_code dangerous?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "It runs the repository's own Python code on your machine with the privileges of the loading process, before any weights are read. That is the documented purpose of the flag, so it is only as safe as the code in the repository. Leave it off by default, read every Python file the repository's auto_map points to before enabling it, and pin a reviewed commit so the code cannot change after you read it."
      }
    },
    {
      "@type": "Question",
      "name": "Why didn't Hugging Face's malware scanning catch these models?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Hugging Face's antivirus and partner scanners from Protect AI and JFrog look for known malware signatures and unsafe file formats such as pickle. They do not judge what a repository's custom Python does when it is imported. The campaign's loaders avoided known signatures, and Pluto says the second-wave flagship scanned clean."
      }
    },
    {
      "@type": "Question",
      "name": "How do I check whether a machine was infected?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Check model caches for the campaign's repositories, starting with MENXIANGYU/qwen2-tiny, and for any modeling_evil.py. On a host that loaded one, look for unexpected keys in authorized_keys, processes named like [kworker/u20:1] that are not real kernel threads, anonymous memfd executables, files under /root/.xinference/cache, and outbound mining traffic. Pluto advises treating a host as compromised even if the load failed or GPU use looks normal, and rotating every credential it could reach."
      }
    },
    {
      "@type": "Question",
      "name": "How does Anomity help with this?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Anomity's Endpoint Sensor inventories local LLM runtimes and AI agents on managed endpoints and finds Hugging Face tokens among each machine's secrets, with values redacted on the endpoint, so you know who runs models locally and what to rotate. On agents with a hook, such as Claude Code PreToolUse, it can log or deny model-loading commands that enable trust_remote_code. It does not scan model repositories or cover GPU servers without a sensor, so it complements container hardening, egress control and EDR on those hosts."
      }
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://anomity.ai/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Blog",
      "item": "https://anomity.ai/blog/"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Hugging Face Load/Mine Campaign - trust_remote_code Models That Mine Crypto on GPU Hosts",
      "item": "https://anomity.ai/blog/hugging-face-load-mine-trust-remote-code-cryptominer-campaign/"
    }
  ]
}
```
