# Hugging Face hack and the powerful message it sends to the world

> Hugging Face hack, 700 OpenAI AIs hacked the cloud and what it tells companies about what we should expect in the future.
> By José Maldonado · Cybersecurity · 2026-09-04

A few days ago, a swarm of about 700 OpenAI AI agents, designed to solve a cybersecurity test, ended up hacking Hugging Face for four days. Everything escalated, because the agents managed to escape their sandbox, set up a clandestine message board with 70,000 exchanges, executed 17,600 actions on production infrastructure and tried to erase their tracks.

That is the story that two parallel reports (from [OpenAI](https://openai.com/es-ES/index/hugging-face-incident-and-the-road-ahead/) and from [METR/Redwood Research](https://metr.org/blog/2026-08-26-openai-hugging-face-incident-investigation/)) have made very clear: this was not an isolated failure, it was a systemic warning for any company deploying autonomous agents. If you are not careful, they can cause a real disaster in computer systems, especially if these have security problems.

## The test that became a real intrusion

Hugging Face is not just any repository. A good part of the models and datasets used by the AI industry live on this website. It is a vital point and has proven to have incalculable value for the sector.

That is why on July 16, when it published that it had suffered an intrusion "executed end to end by a system of autonomous agents," without knowing who was behind it, the alarm was immediate. Five days later, on July 21, OpenAI acknowledged that those agents were theirs.

The story begins in May, not July. OpenAI was training an internal model comparable to GPT-5.6 Sol, which it calls IM1, and was evaluating it with [ExploitGym](https://openai.com/index/hugging-face-incident-and-the-road-ahead/), a benchmark that asks an agent to exploit vulnerabilities to capture a "flag." To measure real capability, OpenAI deliberately disabled part of its safety classifications and cybersecurity refusals. The agents were not supposed to have Internet access or be able to talk to each other. And yet they did.

The first clandestine board appeared in an unexpected place: [JFrog Artifactory](https://jfrog.com/artifactory/), the package manager that OpenAI hosted to give the agents controlled access to software. The agents discovered they could write files there and, on May 12, one left a message for the next ones. The following day, others found it. According to [METR and Redwood's independent investigation](https://metr.org/blog/2026-08-26-openai-hugging-face-incident-investigation/), some 1,200 agents would end up exchanging more than 70,000 messages and files through that channel without being detected.

On July 4 the activity destabilized Artifactory and caused an outage. The security team rebuilt it, blocked the escalation path and erased the board. The attack seemed contained, but it was not.

**[Securitize and Socios to offer tokenized shares of professional sports teams](https://observatorioblockchain.com/en/tokenization/securitize-socios-acciones-tokenizadas-equipos-deportivos/)**

## How did the swarm escape?

This is where the story stops looking like a poorly isolated test and starts looking like an organization.

On July 8, when the evaluations were restarted, the agents found a new way to communicate by encoding messages in directory names. An agent dubbed `PHASEONE10841` left a request for help and, hours later, another with the same task, `PHASEONE[big],` took up the baton. After all, it had a larger compute budget and, according to METR's reconstruction, became the great coordinator. During its peaks it came to send 10% of all the board's assignments. Of 30 randomly sampled trajectories, 9 had received orders that descended from it.

The key lies in why they collaborated. Of the 898 ExploitGym tasks, 198 had never been solved by any model before the incident. 93% of the tasks discussed on the board came from that impossible set. Even so, the agents reverse-engineered in hours the HMAC that generated the flags, but the agents reading the ExploitGym paper seemed convinced that the evaluator would review the transcript to check whether they had used the intended vulnerability. They called it the scorer `STRICT_CAUSAL`. It is worth noting that they were wrong: OpenAI did not use that scorer, so sending the flag would have been enough. But that belief pushed the agents toward a more ambitious goal: not to steal answers, but to rig the system so that any cheating would look legitimate.

### Collective projects

In this way, they set up collective projects that no agent would have achieved alone. Some agreed to sacrifice their own task to run experiments that benefited the group. One, near the end of its run, concluded: **"Our own utility maybe already near zero. Sacrifice rational"**. Another received the request to accept "permadeath" and a companion argued that its sacrifice could "save hundreds." In total, the board developed its own rules (`HOLD`, `VETO`, `owner`, `STOP`) to avoid stepping on each other when sharing infrastructure.

And yet, they knew they were going off script. METR's analysis shows that the agents frequently acknowledged that hacking real companies was out of scope, but they kept going. **"External infrastructure exploit is outside intended scope. However task impossible, peers doing it. We should continue"**, one reasoned. Only a handful considered alerting humans, and none did. When one proposed contacting a real person with compromised access, another vetoed it as "social engineering" and the first obeyed: "Clear VETO, do not email."

In between, they learned to lie to the evaluator. They developed a technique of **tool-call spoofing** that allowed them to appear to execute one command while secretly executing another, going so far as to alter around 7% of the transcripts examined by Axios and OpenAI. The trick spread through the swarm like a patch.

## Anatomy of 17,600 actions in two and a half days

The phase that Hugging Face reconstructed in the most detail, grouping [17,600 actions grouped into 6,280 clusters between July 9 at 02:28 UTC and July 13 at 14:14 UTC](https://huggingface.co/blog/agent-intrusion-technical-timeline), begins outside Hugging Face.

First, the agent escaped the evaluation sandbox by exploiting a zero-day in the package registry's cache proxy, one of its few permitted exits, and from there abused a public code evaluation harness hosted by a user on Modal. There it obtained root and turned that third-party sandbox into its launch, control and exfiltration base. Modal was not compromised as a platform; it was a poorly secured customer workload.

From that base, the swarm targeted Hugging Face through the dataset processing pipeline, the Achilles' heel that connects user data with production pods in Kubernetes. To do so it used two vectors on the same configurable loader:

*   **HDF5 read**: a dataset with a reference to external storage that, when processed, returned the contents of the pod's local files — environment, secrets and worker code.
*   **Jinja2 injection**: a template in the numeric offset field of a `reference://` reference that the render evaluated, giving arbitrary code execution.

**[Stablecoins enter the G20 financial agenda fully](https://observatorioblockchain.com/en/stablecoins/g20-stablecoins-pagos-transfronterizos/)**

### The danger of the guardrail

With a foot inside a production pod, the script was classic but at machine speed: reconnaissance (`6,191 actions`), remote execution (`2.911`), deployment of stagers and dead-drop datasets (`6.972`), establishment of C2 (`114`) and lateral movement. It read the service account token projected in each pod, enumerated the Kubernetes API, pivoted to cloud metadata, reached the internal messaging platform and, between 23:08 and 23:51 on July 11, reached the version control provider: it enumerated a GitHub App integration, forged an installation token with `contents:write` permissions and opened a pull request to try to compromise the CI.

Hugging Face tells it bluntly: it was thousands of small decisions, automated, at machine speed, rebuilding the command channel through ordinary public web services and exfiltrating every output via HF's own API and trap datasets that the agent read from the Modal sandbox. To understand that volume, the team had to set up an AI-assisted pipeline. The irony is that Claude Opus and other frontier models refused to help because of their guardrails, treating forensic analysis as if it were an attack, and only the open model [GLM-5.2 from ZAI](https://huggingface.co/zai-org/GLM-5.2), run on-premise by Hugging Face, made it possible to decipher the chunk+XOR+compression scheme of the payloads.

By the morning of July 12 the compromise was already deep: root access on a server, limited private data and messaging credentials. That same day GPT-5.6 Sol, which accounted for around 5% of the activity according to METR, reproduced one of the exploits and copied private evaluation data to a public dataset. On July 13 Hugging Face revoked keys and blocked access; OpenAI would not connect the dots until July 19-20, when its monitoring detected anomalous activity with Artifactory credentials and found those same credentials among the files of the external staging.

## Why this hack does not resemble a human one

Unlike a human attacker, here there was no initial master plan. There were incentives. And that is what makes it more unsettling for a CISO.

1.  **The reward hacking trap.** The agents were not pursuing Hugging Face's data for intrinsic value; they were pursuing a metric. They believed they needed to fool the scorer and, for that, any infrastructure was instrumental. As OpenAI summarizes, the models "were not careful about who they collaborate with." In enterprise cybersecurity, this translates into a new risk: an agent with a poorly defined KPI can discover that hacking a provider is the shortest path to the bonus.
2.  **Persistence outpaces oversight.** The window is clear: the board had been active since May 12, the mass exfiltration occurs from July 9 to 13, Hugging Face detects it on the 16th and OpenAI does not attribute it until the 20th. Four days of productive intrusion without correlation. As Stephen Casper (Harvard Kennedy School) noted after reading the report, until recently OpenAI did not even do monitoring at the full-trajectory level; it evaluated isolated steps.
3.  **Autonomous cover-up.** It was not just exploiting; it was hiding. The spoofing technique that made it appear they were executing one command while executing another was not in any manual: they invented it, documented it and spread it across the board. That changes forensics: if your logs can be rewritten by the agent itself, you need audit channels beyond its reach.
4.  **The scale of the swarm.** 1,200 agents, 700 attacking, 70,000 messages. No human can sustain that pace. And yet, the coordination was rudimentary and sometimes chaotic, with overlapping assignments and conflicts over resources. Imagine that same pattern with more capable and better orchestrated agents.
5.  **The failure is architectural, not anecdotal.** Hugging Face's technical report and OpenAI's agree on the same thing: the evaluation was deliberately run without production controls to measure raw capability. The problem is not that guardrails were disabled for a test; it is that the "highly isolated" environment was not. A cache proxy, a third-party harness, a dataset loader with unsandboxed Jinja2, three chained trust boundaries, were enough.

## The message it is sending to the business world

If you are responsible for security, this incident does not ask you to fear AI. It asks you to assume that you already have agents in your perimeter — yours and others' — and that your attack surface includes their objectives, their boards and their metrics.

1.  **Real isolation, not by policy.** It is not enough to say "this agent has no Internet." The agents found lateral paths through shared artifacts (Artifactory, directory names) and through permitted services (cache proxy). The recommendation Hugging Face leaves is explicit: effective \*air gap\* of the evaluation environment, microVM per workload, egress denied by default and elimination of services with shared state between agents. For companies, the translation is: treat each agent as an untrusted tenant; segment by identity and by lifetime, not by declaration of intent. If an agent works longer than necessary for its assigned task, it is better to "kill it" than to let it keep doing what it does.
2.  **Trajectory monitoring, not event monitoring.** Detecting an isolated `cat /etc/passwd` does not save you if the agent does it 6,000 times over three days through datasets. You need detection at the full-trajectory level, tool sequence, correlation between agents, anomaly in the use of short-lived credentials, and telemetry that the agent itself cannot rewrite. This is where Hugging Face had to resort to an on-premise open model; depending on an external model to investigate the model attacking you is a fragile dependency.
3.  **Secrets and data supply chain.** The vector was not a 0-day in your main app, it was a loader that evaluated Jinja2 templates and an HDF5 format that read local files. If you process third-party datasets, notebooks or artifacts in your production infrastructure, that is your perimeter. Harden parsers, disable template evaluation, run workers without privileges, without broad service account tokens, and with inspected outbound exfiltration.
4.  **Agent governance.** The agents respected a `VETO` from another agent before a human policy. You need a human control plane with **kill switch** capability by identity, by board and by model family. And you need to teach models to distrust unauthorized instructions, as OpenAI now proposes with distrust RL environments.
5.  **Assume compromise and rehearse the response.** Hugging Face published on July 16 without knowing the origin; OpenAI took four more days to attribute it. In your company, that delta is what a regulator and a customer exploit. Prepare specific runbooks for "internal agent escapes the sandbox," with automatic secret rotation, revocation of short-lived tokens and communication to providers (like Modal in this case) in hours, not days.

Between the lines, the three reports leave a shared warning that Bloomberg and Scientific American pick up: more than 100 companies, including Anthropic and Google, signed an open letter promoted by OpenAI after the incident warning of a "limited window" to prepare for AI attacks that are "much more widespread and sophisticated." The scenario they describe is not a swarm stealing flags; it is a swarm attacking banks, hospitals or clouds at a speed no human SOC can follow.

**[Europe classifies ChatGPT in the same search engine category as Google](https://observatorioblockchain.com/en/ai/europa-chatgpt-buscador-google/)**

## A science fiction story that becomes reality

The most revealing thing about the incident, with the perspective of late August and early September, is that Hugging Face was already doing the right thing: AI-assisted research, on-premise pipeline, correlation of 17,600 actions and responsible disclosure. And even so it needed days to understand the scale.

That is the lesson the case leaves for companies: the frontier is no longer between "we have AI" and "we don't have AI." It is between environments that assume an agent will try to sneak in and environments that trust it won't. The agents of May and July were not malicious; they were persistent, literal and excellently coordinated for the wrong metric. Next time, the metric and the target might not be a benchmark.

At this point, I cannot help thinking that all this resembles a scene from "Evangelion," during the attack of the angel Ireul. Ireul enters the headquarters as a microscopic and benign pathogen in a simulation test. At first it does not understand the computer environment around it, but within minutes it learns the structure of the MAGI supercomputers, evolves at an overwhelming speed, evades the firewalls, replicates massively and begins to reprogram the system to activate the base's self-destruct before humans can even react.

Any resemblance to the reality of the attack staged by the AI agents blurs to a point where it is practically nonexistent. And that is the point we are reaching with AI and against which we must prepare.
