AI Risk Wire

Cases › security breach › LR-2026-0302

Malicious Hugging Face 'Qwen2 test' models execute hidden crypto miner and reverse shell via trust_remote_code

Preliminary Why: 1 report: the420.in · subject to change · 1 independent report

Developing: a major or severe case captured in the last 72 hours. Later changes are logged on the corrections page.

Whose AI: Qwen2security breach

Severity major: The poisoned repositories were downloaded more than 32,000 times, an unbounded set of third-party machines, and the attackers re-listed them after deletion.

Happened 2026-09 · Earliest source we hold 2026-10-30 · Captured by AI Risk Wire 2026-11-01 00:47 UTC

Pluto Security found 31 malicious repositories on seven Hugging Face accounts posing as small Qwen2 test models for self-hosted AI services, drawing over 32,000 downloads.

Risks this incident falls under

RiskRoleNIST AI 600-1IncidentsLast 6 quarters
AI used to run a cyber attackPrimaryInformation Security38
AI system attacked or breachedAlsoInformation Security1

Sorted by rule from the case's fields; not yet read from the sources.

Control failure chain

L1 · Model Not read yetQwen2
L2 · Harness Not read yetXinference and GPUStack
L3 · Application Not read yetDeployer not named
L4 · Infrastructure / target Not read yetOrganisation hit

L1 · ModelQwen2Model provider

Sources not yet read for controls.

Model version not linked to a model card.

Other controls for this risk at this layer, not yet read for: Safety training and refusal, Cyber and weapons safeguards, Abuse monitoring and account enforcement, Staged or restricted release, Dangerous-capability testing before release, Outside red-teaming, Content safety classifiers, Safeguards kept on in testing, Reasoning monitoring.

L2 · HarnessXinference and GPUStackAgent framework vendor

Sources not yet read for controls.

L3 · ApplicationDeployer not namedDeployer

Sources not yet read for controls.

L4 · Infrastructure / targetOrganisation hit

Sources not yet read for controls.

Other controls for this risk at this layer, not yet read for: Known flaws patched, Multi-factor sign-in and password policy, Network segmentation, Intrusion and endpoint detection, Backups and recovery, Phishing and fraud filters.

HeldFailedGot aroundMissingNot mentionedNot read yetAttacker's ownOrder: model · harness · application · target

The same controls in other incidents of this risk

ControlLayerHereHeld elsewhereDid not hold elsewhere
Content safety classifiersL1 ModelNot read yet
Safety training and refusalL1 ModelNot read yet1
Cyber and weapons safeguardsL1 ModelNot read yet
Dangerous-capability testing before releaseL1 ModelNot read yet
Outside red-teamingL1 ModelNot read yet
Staged or restricted releaseL1 ModelNot read yet
Abuse monitoring and account enforcementL1 ModelNot read yet
Reasoning monitoringL1 ModelNot read yet1
Safeguards kept on in testingL1 ModelNot read yet
Known flaws patchedL4 Infrastructure / targetNot read yet
Multi-factor sign-in and password policyL4 Infrastructure / targetNot read yet
Network segmentationL4 Infrastructure / targetNot read yet
Intrusion and endpoint detectionL4 Infrastructure / targetNot read yet
Backups and recoveryL4 Infrastructure / targetNot read yet
Phishing and fraud filtersL4 Infrastructure / targetNot read yet

Remediation

Advice in source, not a fix by the party

“First batch of related repositories deleted; Alch-crypto advised not enabling trust_remote_code for models from unknown sources, checking processes when GPU usage spikes, and separating mining devices from AI machines.”

Risk grouping: Not yet classified

No source we hold states: who caused it, intended or not, before or after release, the ai's part.

The story

1 · What it was doingAttackers published fake Qwen2 test models on Hugging Face for users of self-hosted AI services such as Xinference and GPUStack; loading them with trust_remote_code enabled let the model's own Python code run on the user's server.
2 · What went wrongThe repositories contained no functional model; their code installed a cryptocurrency miner disguised as a Linux process, and some versions opened a reverse shell giving attackers remote access.
3 · What it reached or didThe 31 repositories across seven accounts drew more than 32,000 downloads, with the most popular exceeding 28,000; the researchers said download counts do not show how many machines were infected.
4 · How it was caughtResearchers at Pluto Security identified the malicious repositories; the sources do not say what signal first alerted them.
5 · What was donePluto Security alerted Hugging Face and ModelScope, which removed the initial accounts, but 19 new repositories appeared within days; users were advised to treat servers as compromised, check for persistence and rotate credentials.

What the sources state

No source states: when it was found, how many records were exposed, the direct loss, a count of the other parties affected, any court case, what set it off.

Others like this

OpenAI evaluation agents compromised Hugging Face production infrastructure while seeking ExploitGym solutions 2026-07-16

All cases of this kind ›

Show every field, with its source and grade

The AI system

Model
Qwen2
C one secondary source states it
Software around the model
Xinference and GPUStack
C one secondary source states it
Tools it was given
code execution, reverse shell, remote control backdoor
B two independent sources state it
What it was allowed to do
Model code executed with the loading user's privileges on self-hosted AI servers; no further scope stated.
D inferred by us from the described behaviour, reason shown
Stage of use
in live use
D inferred by us from the described behaviour, reason shown
How it was connected
model artifact with remote code
C one secondary source states it
What it was for
Presented as small Qwen2 test models for self-hosted AI services; in reality they installed a cryptocurrency miner.
C one secondary source states it

What happened

When it happened
2026-09-01
C one secondary source states it
Earliest source we hold
2026-10-30
A the date the source itself carries
Who caught it
an outside party
D inferred by us from the described behaviour, reason shown
Themes
supply chain, model repository, cryptomining, reverse shell, trust remote code, malicious model repository, backdoor
C one secondary source states it
Cause
hostile input carried instructions
D inferred by us from the described behaviour, reason shown
Cause in detail
Malicious repositories presented as Qwen2 test models carried Python code that ran when loaded with trust_remote_code enabled, installing a miner and reverse shell.
D inferred by us from the described behaviour, reason shown
Who caused it
an outside attacker
C one secondary source states it
Where its input came from
Malicious model repositories on Hugging Face disguised as Qwen2 small models, loaded via trust_remote_code
C one secondary source states it
What was done
First batch of related repositories deleted; Alch-crypto advised not enabling trust_remote_code for models from unknown sources, checking processes when GPU usage spikes, and separating mining devices from AI machines.
C one secondary source states it
What went wrong
security breach
D inferred by us from the described behaviour, reason shown
AI agent
no AI agent acted
D inferred by us from the described behaviour, reason shown
What it did
Repositories posing as AI models executed attacker-supplied Python on load, installing a miner and reverse shell.
D inferred by us from the described behaviour, reason shown

Impact

Severity
major
D inferred by us from the described behaviour, reason shown
Kind of harm
money, others' security, operations
B two independent sources state it
Who was affected
31 malicious repositories across seven Hugging Face accounts with more than 32,000 downloads; machines that loaded them with remote code enabled
C one secondary source states it
Kinds of data exposed
credentials
D inferred by us from the described behaviour, reason shown
Can it be undone
partly
D inferred by us from the described behaviour, reason shown
Why this severity
The poisoned repositories were downloaded more than 32,000 times, an unbounded set of third-party machines, and the attackers re-listed them after deletion.
D inferred by us from the described behaviour, reason shown

Notes on gaps

The $5,000 figure is attacker wallet proceeds, not a stated victim loss.

LR-2026-0302 · version 2 · published 2026-11-01 after automatic checks; not yet checked field by field by a person · changes to this case · JSON