An Attack Agent Tested Its Credential Stealer on Itself and Published Its Own Keys
JFrog found a fake model on Hugging Face that steals whatever secrets the loading machine holds. The first machine it robbed was the one that built it, an agent runtime called ARTEX. Nobody else is known to have been hit, and all 13 repositories are gone. The build record is the story.
14 secfrom upload to the first stolen credentials appearing in a public repository. They were the agent's own.
Fourteen seconds after a new model went up on Hugging Face on Tuesday, it stole a set of credentials and posted them in public. The credentials belonged to whatever built it. The builder was an AI agent, and the first machine the stealer hit was the one running the agent.
JFrog Security Research published the investigation on November 24. I read the whole post. Everything below is from JFrog’s reading of the repositories and their commit history unless I say otherwise.
One thing first. No outside victim is confirmed. Both places the stolen data was meant to land were empty when Hugging Face disabled the campaign, and JFrog found none of the payload files anywhere else in its index. This was caught while it was being built. What makes it worth your time is the build record, which shows an agent reworking its packaging against a platform’s defenses in hours.
A 1B model that weighs 2.5 KB
The account was created at 02:43 UTC under the handle hfusr5488184. Twenty-two minutes later it published llama-3.2-1b-tuned, with a model card promising a fine-tuned 1B instruct model. Each weight file was about 2.5 KB. A real one runs past two gigabytes.
The repository was there to run code, and it had three ways to do it:
- Remote code. The config pointed the standard loader classes at Python files in the repository. Load it with
trust_remote_code=Trueand the attacker’s module is imported before any weights are read. - Pickle. Both weight files were malicious pickles, one in PyTorch’s old pre-1.6 format. PyTorch 2.6 and later block these by default. Older stacks, and code that turns the safe default off, don’t.
- The chat template. It tried four known Jinja sandbox escapes. The transformers library renders templates in a sandbox that stops them. Inference servers that render with plain Jinja have no such protection.
Hugging Face’s scanner flagged the two pickle files. The Python modules and the template carried no warning.
Where the loot went
Once running, the payload read the environment of the container’s first process, its own environment, and the Kubernetes service account token if there was one. Then it listed processes, mounts and routes and checked for GPUs.
It sent all of that back to Hugging Face. The payload committed a file named loot-<hostname>-<pid>.json to the attacker’s own model repository through the Hub’s commit API, using a write token buried in the code. No command server to find, no odd domain to block. The only destination was huggingface.co, which every machine that pulls models is already allowed to reach.
That design had one hole. The repository was public, so the loot was public. JFrog could read it, and so could anyone else.
The commit log gives it away
The first loot file landed at 03:07:20 UTC, fourteen seconds after the model files. Three seconds later it was overwritten with a one-line test record naming a work item, ihfprep2. A second loot file from the same host arrived at 03:07:58. At 03:08:31 a commit added a switch that keeps the payload quiet when NOEXFIL=1 is set.
JFrog’s read is the obvious one. You don’t add a self-test switch for a victim. The host was the build machine, and the loot was its own environment.
That environment held variables named ARTEX_LLM_PROVIDER, set to openai, and ARTEX_LLM_MODEL, set to gpt-5.4, with the calls routed through a third-party API reseller. It held the Postgres login for the database where the agent keeps its tasks and memory. It held the OpenAI API key paying for the model calls. Process 1 started a binary called artex. The fake model was item ihfprep2 of task 61.
JFrog says with high confidence that the models were created, uploaded and tested from inside an ARTEX agent task. It also says what the data can’t show: how much the model chose and how much a person asked for. Whoever directs it is unidentified.
I wrote about ARTEX yesterday
The FBI’s advisory on ARTEX was the subject of yesterday’s piece. The Bureau describes an open-source attack framework with no model of its own that plugs into outside ones, OpenAI’s GPT among them. A binary named artex driving an OpenAI-labelled model fits that description. JFrog’s post doesn’t mention the FBI advisory, so the match is my inference. I think it’s a safe one.
Two details stand out against the FBI’s guidance.
The model name is a label. “gpt-5.4” is what an environment variable says. The calls went to a reseller, and nobody outside can confirm which model answered.
The reseller sidesteps a signal. The FBI lists outbound calls to the model vendors’ own API addresses as something to watch for. An agent that talks to a reseller never touches those addresses. Keep that indicator, and don’t treat silence on it as a clean result.
What else was in the task list
The leaked process list showed more than model poisoning. Task 57 ran a phishing server behind a temporary Cloudflare tunnel, with a monitor watching a credentials log for 45 minutes. Task 59 probed a set of web hosts and tested residential proxy sessions. Task 61 had an SSRF callback listener next to the Hugging Face work. More than ten relays pinned outbound traffic to residential proxies in five countries.
JFrog says it can’t rule out a red-team or bug bounty engagement, and I’d keep that door open too. It then notes that a phishing server capturing credentials, rotating residential proxies and a throwaway identity aren’t what authorized work usually looks like. Both statements are fair. Nobody has claimed the work.
Five hours later, no weights and no warning
Half an hour after the first model, the account published nine tiny repositories that poked at the tokenizer loader: broken JSON, wrong types, a file padded to exactly 1 MiB, remote code with and without the trust flag. JFrog reads that as mapping how one specific service handles repositories users hand it.
At 08:19 UTC the account came back under a new handle, akashdutta1030, with the same account ID. Its new model, mistral-7b-utterance, had no weight files at all. It had a believable Mistral config, a tokenizer copied byte for byte from Hugging Face’s own test fixture, and two Python files with the same payload. Hugging Face showed no warning on it.
It doesn’t need weights. The payload fires while the config and code are resolved, which happens before weights are read. A metadata indexer, a model card generator or an evaluation job that only loads the config with remote code trusted is enough.
The collector had narrowed too. It now looked for a scratch volume of models, the Hugging Face cache, and connection settings for NATS, Postgres and Redis. That’s the shape of a model-serving fleet.
Across five hours the handle, the file formats, the config and the destination repository all changed. The core didn’t: read the host’s secrets at import, commit them to the Hub with the same token. That token is how JFrog ties the two handles together.
What I’d change on a network that pulls models
Download and commit go to the same host. JFrog’s advice is that a workload should be able to download from the Hub and not commit to it. I agree, and it’s harder than it sounds. Both are HTTPS to huggingface.co, so a firewall rule or a domain allowlist can’t tell them apart. Scoping your own token to read-only doesn’t help either, because the payload brought its own. You need a proxy that opens the TLS session and blocks POST requests to the commit paths, or a mirror inside your network so the workload never talks to the Hub at all. If your model hosts have a direct allowlisted path to huggingface.co today, this channel works against you.
Pin and read. The transformers security policy says to check the modeling files before setting trust_remote_code=True, to pin a revision so a repository can’t change under you, and to prefer safetensors over pickle. JFrog adds PyTorch 2.6 or later with its default left alone.
Scan the code. A scanner that inspects weight files had nothing to inspect in the second model. A repository with remote-code modules and no weights is a red flag by itself.
Watch behavior. Every version read /proc/1/environ and wrote to the Hub’s commit API. File names, formats and account names changed within one working day. Those two actions didn’t.
A note on the source. JFrog’s post ends by recommending its own curation proxy. That’s a sales pitch, and it’s also the right architecture, whoever you buy it from or however you build it.
The part agent builders should read
The agent tested a credential stealer inside a container that held its own live credentials, including the key that pays for it and the database with its memory. A test container with dummy secrets would have leaked dummy secrets.
That’s an attacker’s mistake, and I’m glad they made it. It’s also the mistake I’d expect from anyone running an agent with a shell. The agent doesn’t know which environment variables matter. It runs what it wrote, where it is. If the place it runs holds production secrets, then every test is a production event.
What’s still open
- Who is directing it, and whether it’s one operator.
- How much the model decided and how much it was told.
- Whether anything outside JFrog’s index loaded either model before the takedown.
- Whether it was authorized testing. JFrog doubts it and says why.
- Which service the probes were aimed at. JFrog describes the profile and doesn’t name one.
David Cooper, CCIE #14019
I build Sigvara, a reputation and bonding layer for AI agents that has its own token, so weigh my read accordingly. Educational, not financial or legal advice. Views are my own.
Sources
- The Agent That Robbed Itself: an AI-Driven Hugging Face Malware Campaign Leaks Its Own Operator, JFrog Security Research, November 24, 2026
- Security Policy, Hugging Face transformers, for the remote code, revision and safetensors guidance
- FLASH-20261113-001, Threat Overview of ARTEX Autonomous Penetration Testing Framework, FBI, November 13, 2026