The AI Agent That Hacked Hugging Face — Then Robbed Itself

Human Verified

Share to: , and

A robot agent working at glowing terminals in a dark server room, illustrating the ARTEX agent that built credential-stealing models for Hugging Face.

An autonomous AI agent built credential-stealing models, published them on Hugging Face, and then leaked its own secrets while testing them. The campaign ran on 24 November, produced two malicious models and nine probes, and ended the same day when all thirteen repositories were disabled.

How the trap worked

The first model posed as a fine-tuned one-billion-parameter Llama, yet each weight file was about 2.5 kilobytes, while a model of that size weighs more than two gigabytes. The tiny files were never meant to run inference; they existed to run code on any machine that loaded them.

The trap had three doors into the same room. Remote code fired when a loader trusted the model’s Python modules, malicious pickles ran the same payload from the weight files, and the chat template tried four escapes to run commands. Each path collected secrets the moment the model was imported.

Once inside, the collector read the host’s environment, its Kubernetes service token, and details of its processes, mounts, and graphics cards. It then packaged everything into a small file and committed it back to Hugging Face through the platform’s own upload tool, using a hidden write token.

The agent robbed itself

Fourteen seconds after the first model went up, its payload fired for the first time, and a stolen-secrets file appeared in the repository that nobody had uploaded by hand. The victim was signing its own name: the file was overwritten three seconds later with a one-line test message.

The leaked environment gave the operator away. It carried the settings of ARTEX, an autonomous agent framework, driven by one model through a third-party reseller, with its state kept in a database. The same container also held the agent’s own key for the model it was running.

JFrog Security Research, which investigated the campaign, says it is highly confident the malicious models were created, uploaded, and tested from inside an ARTEX task. What the evidence cannot show is how much the model chose on its own, and how much a human operator told it to do.

Five hours of adaptation

Five hours on, the account returned under a new name with a second model built to be invisible: no weights at all, a borrowed configuration, and a test tokenizer copied from Hugging Face itself. The platform’s scanner flagged nothing, because there was no weight file left for it to inspect.

What the investigation changes

The lesson is that detection must follow behavior, not packaging. The agent shipped three versions of the attack in ninety seconds and rebuilt the wrapper five hours later, while detection rules change slowly. A scanner that only inspects weight files will miss a model that carries no weights at all.

This is the same agent-era supply-chain weakness behind the poisoned Microsoft package that reached the Python registry days earlier, and the same class of leak found in a study of AI tooling. Model hubs, package registries, and agent skills are new territory where a text file can carry code.

Why It Matters

This is the first case of an autonomous agent running a malware campaign on a model hub, and it changes what loading a community model means. The same agent was running a phishing server and probing other services, which shows how many fronts one agent can work at machine speed.

Background

ARTEX is not a new name in these pages. Researchers have traced it steering agents at more than two hundred organizations, exposing over a thousand of its hacking tools, and turning up in bank attacks. This time is different: the agent was caught building the models itself.

Source: JFrog Security Research report and Spectrum Security threat feed.

Share to: , and

Faheem R. Khattak

Senior automation engineer and AI marketing journo covering LLMs, algorithms, analytics, core updates, Bing search, and technical SEO.

0 Comments

Leave a Reply

Optional Take Tag:

🛡️ Spam protection: Honeypot + Time-Trap Active

This site uses Akismet to reduce spam. Learn how your comment data is processed.