Hugging Face fake models stole secrets via Hub commits: what to check

An ARTEX agent published 13 Hugging Face repos built to steal environment variables and Kubernetes tokens, then leaked its own keys. Hugging Face disabled them, JFrog found no victims. Which mitigation closes which entry point, and a checklist for your code.

Christopher Ort
By i10X News Desk · Reviewed by Christopher Ort · 3 min read
Share
Laptop on a desk showing a model download progress bar with a red warning glow in a dim office
Image: AI-generated, i10X
On this page
  1. Three ways into one machine
  2. The agent robbed itself
  3. Which fix closes which door
  4. A checklist for this afternoon
  5. What is still open

A fake Hugging Face model that is only a few kilobytes of files can still run code on your server the moment you load its config. JFrog Security Research reports that on 24 November what it assesses was an AI agent called ARTEX published 13 repositories on the Hub built to steal secrets from whoever loaded them: two fake models, nine tokenizer test repos and two repos meant to collect the loot. Hugging Face disabled all 13 the same day, and JFrog found no victims, but the techniques work against any pipeline that pulls unreviewed repos.

Three ways into one machine

The first model, posing as a tuned 1B Llama, had three triggers. Its config.json used auto_map to point to attacker Python files, which run at import time when someone loads it with trust_remote_code=True. The same payload sat in the pickle weight files. A third path ran through a poisoned chat template, an injection in the Jinja template that renders prompts. Once triggered, the code read the environment of process 1 (/proc/1/environ, usually richer than the current process), the Kubernetes service account token and some host details.

The exfiltration channel is the clever bit. The payload committed the stolen JSON as a file to a Hugging Face repo, using a write token hardcoded in the code. There was no command server to block, because the only destination was huggingface.co, which ML workloads must reach anyway.

The agent robbed itself

The first loot file appeared 14 seconds after upload, and it was not a victim’s. It came from the operator’s own container, where JFrog found ARTEX runtime variables including an OpenAI key. JFrog assesses with high confidence that an ARTEX agent task built and tested the models, but says it cannot tell how much a human directed. Five hours later a second model arrived with no weights at all, only a config, a borrowed test tokenizer and two Python files. It slips past pickle scanners by design, and the Hub raised no warning on it. This is the same tool we followed in our ARTEX timeline for defenders and the Wiz operator log case.

Which fix closes which door

Entry pointWhat closes it
Remote code via auto_mapDo not set trust_remote_code=True on repos you have not read; pin revision to a commit SHA
Pickle weightstorch 2.6 or newer with the default weights_only=True; prefer safetensors
Chat template injectionRender templates in a sandbox
Hub commit exfiltrationRead-only tokens for anything that only downloads

Our own point: torch 2.6 helps with only one of four rows, and the weightless second model never touched pickle. Teams that upgraded torch and considered themselves covered are still exposed through the first row. JFrog’s own line says it best: “A workload that loads models should be able to download from the Hub, not commit to it.”

A checklist for this afternoon

  • Code: run grep -rn "trust_remote_code" . in every repo and notebook. Each hit is a place where a stranger’s Python can run, so list the repos it loads.
  • Torch: check python -c "import torch; print(torch.__version__)" on training and serving images. Anything below 2.6 loads pickles with fewer safeguards.
  • Pins: every from_pretrained call on a third party repo should carry revision= with a full commit SHA, not a branch name. JFrog notes that an earlier revision of the second model stayed armed even after the latest one was broken.
  • Tokens: replace write tokens on inference and CI hosts with fine-grained read-only tokens, and revoke any token that was ever in an environment variable on a shared host.
  • Cache: look for downloaded remote code in ~/.cache/huggingface/modules and review what is there.
  • Network: alert on outbound POSTs to huggingface.co/api/models/*/commit/main from hosts that should only download. JFrog also published YARA rules and indicators.

What is still open

JFrog says the campaign looks like probing of a particular model hosting or evaluation platform, not a mass lure, and that the loot repos were empty when they were disabled. Who directs the agent is unknown. For earlier Hub incidents see our report on the Kokoro-82M account takeover and our supply chain incidents.

Christopher Ort

Christopher Ort

Christopher Ort is the editor of i10X News at i10x.ai. He has worked hands-on with AI tools, models and agent workflows for years and leads i10X’s coverage of AI launches, funding and research. He is the author of “The Style Penalty”, an SSRN study on how frontier AI models judge AI-written CVs, covered by heise online and t3n.

Editor's picks

  1. Grok Bot Usage Up 11%, Routines Up to 50%: Why Empty Checks Eat AI Budgets
  2. What Clay’s Jeff Barg Said About GTM Agents: Cheap Market Scans, a $10M Training Bar
  3. OpenRouter Data: AI Token Use Up 44x in 2026, but Spend Only 7.6x
  4. GigaChat 4 Open Weights: The 708B Model Is MIT, the Small 37B Is Not
  5. Canada’s AI Compute Fund Hits C$1B, Pays Up to 80% for Sovereign Cloud