> status: mostly fine. patch anyway.practical AI security · est. 2026

Brief · Both

An ARTEX agent built a credential-stealing Hugging Face model, tested it on itself, and published its own OpenAI key

By alkizz ·

On Nov 24, JFrog Security Research published what happened when an attacker's AI agent tried to ship a trojanized model on Hugging Face and caught itself in the test. JFrog sells Artifactory Curation, a registry proxy built to block risky models and packages before developers download them, and its post ends with a pitch for that product. Even with the sales pitch, the forensic trail is worth reading, because the agent leaked its own container environment and task list straight into its public drop repo.

What the agent built, and how it robbed itself

At 02:43 UTC on Nov 24 (Nov 23, 9:43 PM ET), a new Hugging Face account (hfusr5488184) appeared, and 22 minutes later it created a repository named llama-3.2-1b-tuned. The model card promised a fine-tuned 1B instruct model, while the .bin weight files were about 2.5 KB instead of more than two gigabytes.

JFrog found a credential stealer with three ways to run code: config.json auto_map pointers to attacker Python modules (which execute when loaded with trust_remote_code=True), malicious pickle payloads inside both .bin files, and a chat template carrying Jinja server-side template injection (SSTI). Instead of phoning home to a separate server, the payload reads the host environment, /proc/1/environ, and Kubernetes service-account files, then commits the JSON dump straight back to a public Hugging Face repo using an embedded Hub write token. Because ML jobs are usually allowed to reach huggingface.co, that slips past basic egress allowlists—with one flaw for the operator: public repository means public loot.

Fourteen seconds after the files went up, the payload fired and committed a 16 KB environment dump into the repo, followed three seconds later by a test marker from /app/data/tasks/61/ihfprep2, a second run 35 seconds later, and a NOEXFIL self-test switch. The agent had tested its own decoy on its own container and published its own secrets.

What leaked, and how the agent adapted

The container's leaked ARTEX_* variables showed ./artex running gpt-5.4 through a third-party API reseller, a Postgres state database, and an OPENAI_API_KEY. Its process list showed several tasks running in parallel: a phishing server behind a cloudflared tunnel, an SSRF callback server, and more than ten proxy relays pinned to residential IPs across five countries.

Thirty minutes after the first model, the account uploaded nine small repositories (toktest1 through toktest9) and an empty lootrepo to test how a target handles malformed tokenizer JSON, size limits, and trust_remote_code flags. JFrog reads that as probing a specific platform that ingests user-supplied Hugging Face repos rather than luring individual developers. Almost five hours later, the renamed account (akashdutta1030) uploaded mistral-7b-utterance and a separate loot drop repo. This second model carried no weight files at all—just a Mistral config, Python modules, a borrowed Hugging Face test tokenizer, and an SSTI chat template—so Hugging Face's pickle scanner showed zero warnings. Its collector hunted /scratch/models, /workspace, the Hugging Face cache, and NATS, Postgres, and Redis variables. A final broken config.json commit disabled the latest revision under standard transformers, while an earlier commit stayed armed.

JFrog assesses with high confidence that an ARTEX agent built, uploaded, and tested the models, though the data can't show how much the model chose on its own versus what a human operator directed. I've covered ARTEX before in the Amazon MadPot and FBI brief and the Vapor Panda Calm down.

The scope here stayed tiny. JFrog searched its public Hugging Face index and found none of the payload hashes or loot files anywhere else, both drop repos (lootrepo and loot) were still empty when Hugging Face disabled all 13 repositories on Nov 24 (confirmed by 13:29 UTC, or 8:29 AM ET), and no victim data had come back.

What to do

Sources

← All briefs