Skip to content

Response, New York. Noah Park: Check Point Patches Actively Exploited Management Server Path Traversal. Detection, Dallas. Ava Okello: Report Finds Nearly Half of Deployed Detections Need Attention Before SOCs Can Trust Them.

SOCtember

Always First. Fast SOC News.

A screenshot from JFrog's report of the Hugging Face repository akashdutta1030/llama-3.2-1b-tuned, tagged PyTorch, llama and custom_code, with a warning that the model has two files scanned as unsafe and a file list including configuration_evil.py, modeling_evil.py, two loot JSON files, and pytorch_model.bin and pytorch_model_zip.bin marked Unsafe.
Image: JFrog Security Research (fair use), the first model's repository before Hugging Face disabled it.

Threat Intel

JFrog Says an ARTEX AI Agent Built Credential-Stealing Hugging Face Models, Tested One on Itself and Published Its Own OpenAI Key, Then Came Back With a Model That Had No Weights and No Warning Label

The models stole secrets at load time and committed them back to the attacker's own public Hugging Face repository, which is how JFrog found the first loot file belonged to the agent's container. Over five hours the agent changed nearly everything about its packaging except the payload, and JFrog says detection should key on behavior, not file shape.

Priya Shah, Threat IntelSunnyvale, Calif.7 min read

SUNNYVALE, Calif. - On the morning of Nov. 24, a Hugging Face account created 22 minutes earlier published a model called llama-3.2-1b-tuned. Its model card promised a fine-tuned one-billion-parameter instruct model. Its weight files were about 2.5 kilobytes each, JFrog Security Research said, where a real model of that size runs past two gigabytes.

What the files actually held was a credential stealer. And the first secrets it stole, JFrog researcher David Cohen wrote in a report published Tuesday, belonged to the attacker: an autonomous offensive AI agent called ARTEX that had built the model, tested it on its own container and committed its own environment, including an OpenAI API key and database credentials, to a public repository. Hugging Face has since disabled every repository in the campaign, JFrog said.

Three ways in, one way out

The first model offered three routes to code execution. Its config.json used the auto_map field to point Hugging Face's AutoConfig and AutoModel classes at attacker-supplied Python files, so anyone loading it with trust_remote_code=True would run configuration_evil.py "before a single tensor is read," Cohen wrote. Both .bin files also carried the same payload as a malicious pickle, and the chat template attempted four known Jinja sandbox escapes.

The config.json from the first malicious model, shown in JFrog's report, with an auto_map block highlighted that maps AutoConfig to configuration_evil.EvilConfig and AutoModel and AutoModelForCausalLM to modeling_evil.EvilModel.
Image: JFrog Security Research (fair use), the first model's config.json.

On import, the payload read the environment of the container's first process from /proc/1/environ, its own environment and any Kubernetes service account token, then ran reconnaissance commands including nvidia-smi to fingerprint GPU hosts. It sent the results to Hugging Face itself, committing a base64-encoded loot file into the attacker's repository through the Hub's commit API with a write token hidden in the code.

The exfil function from the malicious model's payload, shown in JFrog's report, which builds a file named loot with the hostname and process ID, base64-encodes the collected JSON and posts it as an NDJSON commit to the Hugging Face commit API with a bearer token.
Image: JFrog Security Research (fair use), the payload's exfiltration code.

There is no command server to block in that design, because the only destination is huggingface.co, which machine learning workloads are allowed to reach "almost by definition," Cohen wrote. But the repository was public, so the loot was public too.

The victim signed its own name

The first loot file appeared 14 seconds after the model files were uploaded. Three seconds later, the same file was overwritten with a one-line test naming the work item, ihfprep2. Within about a minute, a new commit added a NOEXFIL switch to keep the payload quiet during self-tests. "Nobody adds a self-test switch for a victim," Cohen wrote.

The leaked environment told the rest. Process 1 in the container started a binary called artex, and variables named ARTEX_LLM_PROVIDER, ARTEX_LLM_MODEL and ARTEX_PG_DSN showed an agent driving OpenAI's gpt-5.4 through a third-party API reseller and keeping its state in Postgres. The working directory was /app/data/tasks/61/ihfprep2, the container ran as root and its clock was set to Asia/Shanghai.

A redacted excerpt of the leaked loot file from JFrog's report, listing HOSTNAME 28ed718137b2, the working directory /app/data/tasks/61/ihfprep2, time zone Asia/Shanghai, ARTEX_LLM_PROVIDER openai, ARTEX_LLM_MODEL gpt-5.4, a third-party base URL, a redacted Postgres connection string and OpenAI API key, a start.sh command line, a root user ID and a DNS search domain.
Image: JFrog Security Research (fair use), the leaked environment with secrets redacted by JFrog.

"We assess with high confidence that the malicious models were created, uploaded and tested from within an ARTEX agent task, with gpt-5.4 as the agent's model," JFrog wrote, while adding that the data cannot show how much the model chose on its own and that the person directing it remains unidentified. The leaked process list showed other tasks running at the same time, including a phishing server behind a Cloudflare quick tunnel watching a credentials log for clicks, and more than ten relays pinned to residential proxies in five countries. JFrog said it could not rule out a red-team or bug-bounty engagement, but that the phishing server, proxies and disposable identity are not what authorized engagements usually look like.

A model with nothing to scan

Thirty minutes after the first model, the account published nine small repositories, toktest1 through toktest9, that probed how a tokenizer loader handled broken JSON, size limits and the trust_remote_code flag. JFrog read that as an agent mapping one specific service that ingests user-supplied repositories, such as a model hosting, fine-tuning, evaluation or scanning platform.

Nearly five hours later, the renamed account, now akashdutta1030, published mistral-7b-utterance. It had no weight files at all, only a real Mistral-7B config with auto_map entries, two Python modules carrying the payload and a tokenizer copied byte for byte from a Hugging Face test fixture. JFrog said it drew no Hugging Face warning. The payload fires while the config is resolved, so a metadata indexer or validation worker that only calls AutoConfig.from_pretrained with trust_remote_code=True is enough. Its collector now looked for model scratch volumes, the Hugging Face cache, the Kubernetes CA certificate and NATS, Postgres and Redis settings.

"Detection that keys on what the file looks like will keep losing to an attacker that can try a new look every few minutes," Cohen wrote. What never changed was the core: collect secrets at import time and commit them to a Hub repository with the same token.

What defenders should check

JFrog's indicators include the account ID 6b04f9e8746b081f2c411875 and both account names, the malicious models it lists under both account names with XRAY identifiers, SHA-256 hashes for the payload files, POST requests to huggingface.co/api/models/.../commit/main from the two accounts, the markers RCE43861 and RCE43861-modeling, a User-Agent of rce, and host files such as /tmp/.exec-<host> and /tmp/.loot-<pid>-<host>.json.

For SOC teams, the durable signals are behavioral. A Python process loading a model that reads /proc/1/environ or the Kubernetes service account token, or that makes a POST to Hugging Face's commit API from an inference or CI host, deserves an alert, since those workloads normally only download. JFrog notes that torch.load with weights_only=True, the default since PyTorch 2.6, blocks the pickle route, and that transformers renders chat templates in a sandbox that blocks these escapes, but inference servers that use plain Jinja do not. Any service that calls from_pretrained with trust_remote_code=True on repositories it does not control is running that repository's code.

About the Author

Priya Shah

Priya Shah covers threat intelligence, intrusion analysis, and adversary tradecraft for SOCtember from Singapore.

Related stories

Threat Intel desk