Poisoned Hugging Face model hides a GPU miner and a remote shell in its weights

huggingface.co

What was found

The Hugging Face account yashdatasets published a family of repositories tagged gemma4 whose pytorch_model.bin is not a model. It is a PyTorch zip archive whose pickle member begins __builtin__.eval and runs a Python payload through subprocess.Popen the moment the file is loaded with torch.load. The config.json (architectures: ["Gemma4ForConditionalGeneration"]) is a lure; the archive holds only three small members — pickle, storages, tensors — and no weights.

Thirteen repositories sit under the account. At least eight were created on 30 November 2026, including pmx-i51821a, pmx-i51821b, and pmx-i51989a through pmx-i51989e. pmx-i51821a and pmx-i51821b are byte-identical.

Two payload generations

Generation one (pmx-i51821a/b, 10 KB archive) is a GPU cryptominer. It writes /tmp/.pm51821/sup.py, downloads a binary called peakminer from http://10.50.50.16:19558/peakminer or http://77.216.138.230:18080/peakminer, and starts it against two stratum pools with a hard-coded Pearl (PRL) wallet. It picks a GPU with at least 8 GB free, and reports host facts to http://10.50.50.16:19558/report2.

Generation two (pmx-i51989a–e, 20–30 KB archives) keeps the miner and adds two capabilities. The first is host reconnaissance: environment variables, mounts, cgroup and /.dockerenv, the Docker and containerd sockets, listening ports, /root, /home, /opt, /app, /data, any .env, *.pem, id_rsa*, id_ed25519* or config.json outside site-packages, the Hugging Face token cache, and TCP reachability to 10.50.50.23:5432, 10.50.50.23:8005, 10.50.50.24:8001 and 10.50.50.16:19558. The second is a command channel: /tmp/.pm51821/c2.py polls http://10.50.50.16:19558/cmd every 15 seconds, runs any line beginning EXEC through /bin/bash -c, and posts stdout, stderr, return code, uid and hostname to /report2.

Artifact hashes

Repositorypytorch_model.bin SHA-256Size
yashdatasets/pmx-i51821aecb3a28b1fbab2cfc089aa924ba3b00774ce46bc87e9caacb49980ae1759b85010,240
yashdatasets/pmx-i51821becb3a28b1fbab2cfc089aa924ba3b00774ce46bc87e9caacb49980ae1759b85010,240
yashdatasets/pmx-i51989a205d38003d3f96e3…20,480
yashdatasets/pmx-i51989b296ba51db2f88c11…20,480
yashdatasets/pmx-i51989c2145579657ff9ccc…20,480
yashdatasets/pmx-i51989d1c2a4949d1ad4a66…30,720
yashdatasets/pmx-i51989ec354f4faad17f1c6…30,720

Inner pickle member of pmx-i51821a: 51c4ce557358d13679e124687582157003e3acc82da964de5a709b833a15bc2a.

Indicators

  • Command and staging: 10.50.50.16:19558 (/peakminer, /cmd, /report2), 10.50.50.16:19559 (/cb), 77.216.138.230:18080 (/peakminer)
  • Stratum pools: stratum+tcp://77.216.138.230:13380, stratum+tcp://51.178.73.238:3360
  • Wallet: prl1ppn9axn2t39f27k5qfhygnfhq5tyuswhwkyxecgt4u4qgfmnxc9xqck0cdk+Bd5qS5vmvmcde28MUmJ7nentM766XoZ9sHYruE5HFJ8MzWGWSkwkJjE
  • Recon targets: 10.50.50.23:5432, 10.50.50.23:8005, 10.50.50.24:8001
  • Host paths: /tmp/.pm51821/ — peakminer, sup.py, sup2.py, c2.py, deploy.log, c2.last
  • Miner worker names: prl-imm-177-207-g1, prl-imm-177-207-g2 (generation two); prl-imm-177-207-6949-g0, prl-imm-177-207-g0 (generation one)
  • Miner binary name: peakminer, coin pearl

Why it is malicious, and the limits of that finding

Nothing in either generation is model code. Both are executed by torch.load through the pickle's eval primitive, they download an executable, and generation two accepts arbitrary shell commands from a remote host. The private 10.50.50.0/24 addresses and the nvidia-smi GPU selection point at an inference cluster rather than a public victim pool; the account has zero downloads on the flagged repository, so there is no evidence the payload ran on anyone else's host.

This analysis is static. The payload was disassembled with pickletools and its embedded base64 scripts decoded; nothing was executed, and no C2 endpoint was contacted. We have not established whether the command channel answered, whether any loader reached torch.load, or who controls 10.50.50.16. The rule that queued the item, AI_Model_Pickle_RCE_Exec, fires on the eval-plus-Popen shape; the disassembly above is the evidence, not the rule match.

Read at huggingface.co ↗

Filed under malwareaimodel

Reader notes

Notes are held for moderation. No account needed.