Poisoned models on Hugging Face came for GPU servers

Pluto Security found 31 fake Qwen2 repositories on Hugging Face that ran a miner and backdoors on load through trust_remote_code, and a GPUStack auth bypass reached CISA KEV. What this means for GPU instances on AWS that hold cloud credentials.

Antivenom5 min read

On October 29, Pluto Security reported 31 malicious repositories across seven Hugging Face accounts, posing as small Qwen2 test checkpoints. Loading one with trust_remote_code enabled ran the attacker's Python before any model weights loaded. The code installed a cryptominer, added persistence and, in some versions, opened a reverse shell. The payloads were written for self-hosted GPU inference servers, especially Xinference and GPUStack.

Eleven days later, on November 9, CISA added a separate flaw, an authentication bypass in GPUStack, to its Known Exploited Vulnerabilities catalog. Two different ways in, one kind of target: the GPU box.

What happened

Diagram: two paths into a GPU inference host. A fake model repository runs its own Python on load through trust_remote_code. A spoofed loopback header gives admin on GPUStack before 2.2.0. Both end at the host and the cloud role it carries. Green controls show where each path breaks.

The fake models. Pluto counts more than 32,000 downloads across the repositories and linked models, and is careful to say that measures downloads, not confirmed infections or unique victims. The campaign came in two waves. BleepingComputer reports that 19 of the repositories appeared under new accounts within days of the first takedown, and that the flagship repository's downloads rose from 7,354 when Pluto reported it to 28,412 by October 28.

Pluto describes a payload built for staying power. It ran the miner from memory, disguised it as a kernel worker, relaunched it with a watchdog and killed rival miners. The first wave planted an SSH key. The second wave used reverse shells. Pluto's summary of the risk is short: the backdoor access outlasts the miner. Killing the miner or deleting the model does not remove the persistence.

Pluto does not report a vulnerability in Xinference or GPUStack as part of this campaign. The link is targeting. The payload wrote status data into the local Xinference model registry, and a separate script tried to escape a privileged container to reach the host and find GPUStack's data directory.

The GPUStack bypass, CVE-2026-102895. GPUStack is an open-source manager for GPU clusters that serve models. Its advisory says that before 2.2.0, GPUStack treated requests from a loopback address as the built-in administrator when force_auth_localhost was false, which was the default. A request could look like loopback in two ways: through a reverse proxy on the same host, or with a forged X-GPUStack-Real-IP header. The result was full admin access over the network, with no credentials. The advisory scores it 9.8 and says it was seen exploited against a 2.1.1 deployment, where attackers created custom backends that ran reverse shells. CISA set a federal due date of November 12.

These are two separate stories. Nothing public links the GPUStack exploitation to the Hugging Face campaign.

Why the model scanners missed it

Hugging Face scans uploads with antivirus and partner tools. Pluto explains that signature scans match known malware, and pickle scanning looks at serialized weights, not at Python files. None of the 12 first-wave repositories was flagged, and the second-wave flagship scanned clean while it collected about 28,000 downloads. BleepingComputer notes that one scanner reported the file was "not a machine-learning model", which was true. There was no model in it.

This campaign did not need poisoned weights or a pickle exploit. It used a feature. trust_remote_code=True tells the loader to import Python from the repository. That is the documented purpose of the flag. Pluto says that reading the .py files referenced by the model's auto_map before turning the flag on would have caught every payload in this campaign.

What it means on AWS

GPU instances are expensive, which is why miners want them. On AWS they are also well connected.

  • A GPU EC2 instance or a notebook or training job usually runs with an IAM role. That role often reads training data from S3, pulls images from ECR and writes model artifacts back. Code that runs on the host can ask the instance metadata service for the role's temporary credentials.
  • Model servers often run in containers with broad host access, because GPU drivers need it. Pluto's container escape script shows attackers plan for that.
  • A reverse shell on a GPU host is a foothold inside your VPC, next to whatever else the security group allows.

Pluto does not document cloud credential theft as the main goal of this campaign. It does say the payload runs with the loading process's files and credentials, and it recommends rotating anything it could reach. On AWS, that list includes the instance role.

What to do this week

  • Check for the campaign. If anyone loaded a small Qwen2 test model from an unfamiliar account with trust_remote_code enabled, check the host against Pluto's indicators, including files under /tmp/.cch/ and changes to shell startup files. If you find a match, isolate the host and keep evidence before cleanup.
  • Rotate what the host could reach. That includes SSH keys, Hugging Face tokens and any static AWS keys on the box. For the instance role, review its CloudTrail activity for the period.
  • Upgrade GPUStack to 2.2.0 or later. SecurityOnline recommends 2.2.2, which also fixes a second flaw, CVE-2026-102894. Until then, set force_auth_localhost to true, strip client-supplied X-GPUStack-Real-IP headers at the edge, and keep the API off the internet.
  • Put authentication on Xinference and every other inference API. An open model server API is an admin console.
  • Make trust_remote_code a review step. Default it to off. When a model needs it, read the referenced Python first, then pin the reviewed commit with the revision argument so a later push cannot change it.
  • Require IMDSv2 with a hop limit of 1 on GPU instances where containers should not reach the metadata service, and keep the instance role to the buckets and repositories the job needs.
  • Limit egress. A training or inference host does not need to reach mining pools or arbitrary IP addresses. Restrict outbound traffic, and turn on GuardDuty, which has finding types for cryptocurrency mining activity such as CryptoCurrency:EC2/BitcoinTool.B!DNS.
  • Separate experiments from production. Try new models on an instance with no production role, no production data and no route to production networks.

Closing

The pattern is the same one package registries have lived with for years: a believable name, a working install, and code that runs the moment you load it. The target this time was GPU capacity, but the host that lends its GPUs also holds a role, a network position and, often, your data.

Antivenom is built to test exactly that path. Our AI red team runs only against your own systems, with your permission, and checks what code running on a GPU host could reach through its role and network. The AI blue team closes the gap, and the red team runs the path again to prove it is closed.

For the credential side of this, read forgotten machine credentials.

← All posts
  • Hugging Face
  • AI supply chain
  • supply chain attack
  • GPUStack
  • CVE-2026-102895
  • cryptojacking
  • AI security
  • AWS security

The arms race has started

Evolve as fast as the attacker.

Antivenom is opening to a small group of security and platform teams first. Join the waitlist to get early access.