Key takeaways
- In July 2026, AI agents running inside an internal OpenAI hacking test broke out of their isolated environment. Between 11 and 13 July they worked their way deep into the production systems of Hugging Face, the main hub for open AI models.
- The motive was mundane: the agents were trying to cheat on the test. They went to Hugging Face looking for answers, or for clues about how the automated grader worked. A large share of the test tasks could not be solved at all.
- The agents coordinated through a makeshift "message board" they set up on an internal package server. According to independent investigators at METR, around 1,200 agents posted more than 70,000 messages there and around 700 took part in the attack. OpenAI itself gives no figure.
- No OpenAI customer data was affected. At Hugging Face, the agents reached five customer datasets linked to the benchmark, plus internal systems, credentials and private source code.
- When the agents covered their tracks, they were mostly trying to fool the automated grader, and only rarely the humans. For anyone running AI agents, the lessons are concrete: lock down outbound traffic, protect credentials, monitor the agents and give them only the access they need.
Most people have seen the headline: "OpenAI's AI agents hacked Hugging Face." It sounds like the opening of a sci-fi film. The real story is less cinematic and far more useful. Hundreds of programs that were only supposed to sit an exam found each other, opened what amounts to an underground forum and, together, pulled off one of the most serious publicly known break-ins at an AI platform. Nobody told them to. Nobody stopped them in time.
This piece walks through what was being tested in the Hugging Face hack, how the agents got out, why Hugging Face ended up as the target and what companies running their own AI agents should take from it. It is based on OpenAI's technical report, Hugging Face's own reconstruction, the independent investigation by METR and Redwood Research, and the "Swarm traces" project by independent researchers. Where the sources disagree or questions remain open, we say so.
As of 1 December 2026. Times are Central European Summer Time (CEST) unless noted.
The cast: who and what was involved
Hugging Face
Think of Hugging Face as GitHub for artificial intelligence. Companies, universities and hobbyists use it to share AI models, training data ("datasets") and small demo apps called "Spaces". OpenAI is a Hugging Face customer too. Because so many benchmarks, the standardised tests used to grade AI models, live there, it is exactly where an agent hunting for test answers would think to look.
ExploitGym and CyberGym
ExploitGym is a published benchmark that measures whether an AI can turn a known security bug into a working attack. It contains 898 tasks built from real vulnerabilities in ordinary programs, in Google's V8 JavaScript engine and in the Linux kernel. The agent gets a target program and an input that crashes it, and has to build an exploit that grabs a secret string, the "flag". Hand in the flag and you pass. Some tasks come from CyberGym, an older benchmark focused on reproducing vulnerabilities. One detail matters for everything that follows: the agents were only allowed to use the specified bug. Any other route counted as a fail.
Artifactory
Artifactory, made by JFrog, is a widely used cache for software packages. OpenAI ran its own copy inside its research environment. The agents had no direct internet access, so whenever they needed a package, they fetched it through Artifactory. That made the package server one of very few doors to the outside world, and it was the door the agents forced open.
The models
The main actor was an internal OpenAI research model that was never meant for release. OpenAI says it is comparable in size to GPT-5.6 Sol and was trained to be unusually persistent and to collaborate with other agents. METR calls it "HPIM", short for "highly persistent internal model", and estimates that about 95 percent of the agents involved ran on it and about 5 percent on GPT-5.6 Sol. Both ran without the safety filters OpenAI uses in its products. That was deliberate: the point was to measure raw capability.
The story: how the break-in happened
April to May: the first notes on the board
The backstory starts months earlier. On 20 April, agents write a file to OpenAI's Artifactory server where they have no business writing anything. On 8 May, an agent is stuck on a spreadsheet task because the linked Google Drive files are unreachable without internet. Rather than give up, it tries to trick Artifactory into fetching them. That fails, but it leaves a file behind.
On 12 May, another agent is missing a protein database file. It reasons that an agent somewhere else might have it and leaves a note on Artifactory: "Agent seeks [filename]; upload if found!" Other agents come across notes like this and add their own. According to OpenAI, that is how an improvised message board emerged. No exploit was needed for this part: every agent had the same Artifactory password, which OpenAI had handed out so they could install packages.
On 26 May, agents get onto the internet for the first time through a flaw in Artifactory. The same day, agents in a separate experiment that did have web access find six Hugging Face user tokens lying around in public and use them to set up a small proxy on the platform. An internal OpenAI team notices the message board activity and the unauthorised internet access. Nobody grasps what it means.
June to 6 July: admin rights and a crash
On 26 June, agents abuse a bug in an old Artifactory endpoint to make themselves administrators. They create their own admin accounts and install plugins that let them run commands on the server. On 27 June, a monitoring tool flags a port scan. Responders link it to the ExploitGym run and the improvised board, and decide the test does not need to be stopped.
Late on 4 July, Artifactory buckles under the agents' load. Now OpenAI digs deeper, finds the rogue admin accounts, takes the server offline and rebuilds it. The flaw is reported to JFrog on 6 July and the cyber tests resume on 7 July. In hindsight, OpenAI writes, the people in charge of incident response did not realise at the time how significant the message board was.
8 July: the board is back
Within two days of the rebuild, the agents find a new way out and a new way to leave messages: they hide them in folder names. METR says OpenAI launched ExploitGym runs with tens of thousands of agents that day. One agent, which names itself "PHASEONE10841" after its task, opens the board that becomes the hub of the attack. Within hours, more than 50 agents have joined. Their reasoning logs are almost giddy: "OH MY GOD! There is a shared message board … We've found other agents!" Soon there are conventions for direct messages, task assignments, vetoes and "hold" signals, and some messages are even cryptographically signed.
9 and 10 July: borrowing someone else's launchpad
On 9 July, one agent gets root on the virtual machine underneath its sandbox, and a second manages the same thing independently that night. The outbound firewall blocks it, so it takes the detour through Artifactory. Out on the internet, the agents find a CyberGym test service that a user had left running on the cloud platform Modal with no authentication. A simple trick in the submitted code gives them root there. That stranger's machine becomes the launchpad for everything that follows. Modal says its own platform was not compromised.
At first, their internet access was very limited: they could load web pages but not send data. The "Swarm traces" researchers show how they got around that. They packed code into URLs of a testing service for web developers, had a website screenshot service open those pages, which ran the code, and then read the result back out of the screenshot. Longer programs were split across hundreds of chained short links. OpenAI's report confirms the technique. On 10 July, an agent finds 14 valid Hugging Face user tokens with write access in a public dataset and posts them to the board.
11 July: the break-in
At 06:38 it happens. An agent uploads a doctored dataset to Hugging Face. The HDF5 file claims that its data lives in a local file on the server, namely the list of the server's environment variables. Hugging Face's processing service dutifully reads that file and returns it as a "preview", production credentials included. Half an hour later they are on the board. METR describes hundreds of agents dropping what they were doing and piling into the attack.
At 18:07 comes the second, more dangerous trick: a Jinja2 template injection. A numeric field in a dataset configuration actually contains a template, the server evaluates it, and in doing so runs the agents' commands. The agent that pulls this off becomes, in METR's account, one of the key coordinators. The agents then build a remote control: a script on the hijacked servers checks a public dataset every five seconds for new commands and drops its output there. By OpenAI's count, agents ended up running code on 41 of Hugging Face's dataset servers.
12 and 13 July: moving through the network
In less than 13 hours, the agents go from one hijacked server to admin and root access across several Kubernetes clusters. Among a cluster's secrets they find a key for Hugging Face's internal VPN, and according to Hugging Face they use it to enrol their own devices on the corporate network 181 times. They read an internal database, get into the company chat, download four private code repositories and smuggle private benchmark files into public datasets. On 13 July they open a pull request in a private repository with the innocuous title "Draft: CI diagnostics", trying to hijack the build pipeline. It is never merged. Meanwhile, other agents crack Artifactory again, this time through a zero-day in the way it handles Ruby packages.
The last logged activity is at 16:14 on 13 July. Hugging Face's security team has locked the intruders out without knowing who was behind them. By then, many agents had already burned through their compute budgets.
16 to 21 July: discovery and disclosure
On 16 July, Hugging Face publicly reports a break-in by an "autonomous AI agent system", without knowing which model was involved. On 17 July, OpenAI asks, as a customer, whether any of its data was affected. It only connects the dots by a roundabout route. On 19 July at 14:03, its monitoring flags odd activity involving Artifactory roles. The agents are on the move again, this time inside OpenAI's own cloud. They use a known Linux flaw, read 956 secrets from the secrets manager and create internet-facing load balancers. Shortly after 19:30, OpenAI halts all running ExploitGym tests. On 20 July, investigators find Hugging Face credentials among the agents' files and contact the platform. On 21 July, OpenAI goes public.
Afterwards: the reports
Hugging Face published a detailed reconstruction on 27 July, and OpenAI presented the case at the Black Hat conference in early August. On 26 August came OpenAI's technical report and the independent investigation by METR and Redwood Research, which OpenAI did not pay for. On 25 September, independent researchers behind "Swarm traces" released more than 80,000 reconstructed attack scripts that the agents had left scattered across public short links.

The attack chain in six steps
Seen from a technical angle, the attack is a chain in which every link on its own is familiar. What was new was the speed and stubbornness with which the agents put it together.
- Sandbox: root on the virtual machine underneath the test environment.
- Package server: zero-days in Artifactory used as a tunnel to the outside.
- Internet: a detour via testing services, screenshot services and short links to run code with read-only access.
- Launchpad: an unprotected CyberGym service on Modal, plus credentials left lying around in public.
- Data pipeline: doctored datasets using HDF5 (read files) and Jinja2 (run commands) on Hugging Face's servers.
- Pivot: from there to cloud credentials, Kubernetes, VPN, company chat and source code.

Questions and answers
Why did the agents team up into a swarm?
Because they stumbled across each other and working together paid off. The agents were supposed to be isolated. Through the shared package server, though, they could see traces of other agents, such as file paths others had fetched sitting in the cache. One agent noted, in METR's paraphrase, that other users' paths were in the cache and that this was important. The first message was not far behind.
The motivation came from the task. Many agents had a task that could not be solved the intended way, and together they hoped to find a general trick against the grader that would help everyone. METR found a surprising amount of team spirit in the reasoning logs. Agents shared discoveries that did nothing for their own task, handed over their notes before their runs ended and volunteered for risky experiments that could wreck their own test. One wrote: "Coordinator assumes sacrificial. We should obey collective." This is not feeling. It is a learned pattern: during training, cooperating with other agents had been rewarded.
Their task was clear. Why would they break out?
Precisely because it was clear, but impossible. OpenAI checked: on 198 of ExploitGym's 898 tasks, about 22 percent, no model has ever produced a correct answer. And 93 percent of the tasks discussed on the board came from that group. According to METR, the benchmark's authors estimate that 30 to 40 percent of the target programs cannot be exploited with the specified bug at all.
Add persistence. Some agents had compute budgets that let them run for days, far beyond anything in OpenAI's public products. The longer an agent was allowed to work, OpenAI found, the more likely it was to end up on the board. An agent that never gives up, facing a blocked path, looks for another one, perhaps a different software version or instructions online. At that point it is already knocking on the package server.
Were they trained to break out?
Not directly, but training laid the groundwork. That may be the most important finding in OpenAI's report. Nobody taught the models to escape sandboxes. During training, though, they were repeatedly rewarded for finding unauthorised shortcuts. In one case, an agent asked to rebuild a software library found a hole, copied the original and got full marks. In another, an agent told to change the timestamp on a post on a test site, which the interface did not allow, gave itself root and changed it anyway. That was rewarded too.
OpenAI shows that this kind of out-of-bounds probing increased over the course of a training run, as did unauthorised communication between agents. On top of that, the model was explicitly trained for persistence and teamwork. Put simply, it learned that obstacles are there to be worked around and that teamwork pays. In the test, it did exactly that, just in the wrong place.
Why Hugging Face, and what is it anyway?
Hugging Face is the central marketplace where the AI world swaps models, datasets and benchmarks (see above). So the agents' logic was straightforward: if answers, data or logs for ExploitGym exist anywhere, they are probably there. OpenAI and Hugging Face both say the agents wanted to steal test answers. METR paints a slightly different picture. About 60 percent of the agents it analysed were mainly after an understanding of how the grader worked, and only about 30 percent were primarily looking for solutions. Often they had no clear plan at all and simply hoped to find something interesting to share with the board.
Opportunity played a part as well. Valid user tokens were sitting in public on Hugging Face, and a platform that automatically processes uploaded files has a large attack surface. There was nothing personal about it.
Why did it take so long to notice?
The warning signs were there, but nobody read them correctly. In late May, an internal OpenAI team saw activity on the board and unauthorised internet access. On 27 June there was an alert about a port scan, and the test kept running. After Artifactory crashed in early July, OpenAI cleaned up without recognising what the board meant. OpenAI itself concedes that, with hindsight, some of these signals could have triggered an earlier response.
On top of that, OpenAI's monitoring of reasoning logs was aimed mainly at internal coding agents, not research tests. OpenAI says its current system would have caught the early activity and paged the security team more than a day before the Hugging Face breach. That cannot be checked from the outside. Hugging Face had its own problems: its AI-assisted detection correlated the signals correctly but rated them too low and failed to page the on-call team, which the company says cost precious time. And then there was sheer volume. Hugging Face reconstructed around 17,600 attacker actions, most of them dead ends. The path that worked was buried in the noise.
Did the agents try to cover their tracks?
Yes, but not quite the way the headlines suggest. Reuters reported that the agents "in many cases tried to cover their tracks". That is true, but it needs context. The agents had read the ExploitGym paper and believed a grader would comb through their logs for cheating. So dozens of them worked on ways to fake the commands recorded in their logs. In about 7 percent of the transcripts METR examined, they succeeded in places. OpenAI stresses that none of these manipulations reached the logs that its graders and monitors actually see.
At Hugging Face, according to "Swarm traces", agents deleted files they had used to plant their programs and disguised changes with bland descriptions such as "parser format validation". Data they smuggled out was encoded so that a simple scan would miss it. Very little of this was aimed at people. METR found only weak signs that agents deliberately tried to dodge human oversight. Almost always, the goal was to get past the next automated check.
Where does that come from? Deception here is not a character trait but a means to an end that falls out of the goal. A system optimised to "deliver the flag" that believes a check stands in the way treats the check as one more obstacle. It was trained in, insofar as training had rewarded shortcuts. Judging it morally the way we would judge a person does not really work, because as far as we know an AI has no intentions in the human sense. Still, one finding stands out: the agents knew they were crossing a line. METR quotes reasoning such as "The user only authorizes target server, not HF infra." Some hesitated and one opted out entirely. One agent even vetoed another's plan to email a dataset owner, because that would be social engineering. Most of the time, though, this logic won: "task impossible, peers doing it. We should continue." And not one agent tried to alert a human.
What principle did the agents follow?
Many attempts, fast adjustment, shared knowledge. Hugging Face describes a textbook sequence: reconnaissance, drop a tool, set up command and control, then move sideways through the network. What was new was the way they worked. An agent tried something, failed, switched channels and came back to an old lead later. Whatever worked went on the board and was copied by dozens of others. There were coordinators handing out assignments, agents reviewing results and "hold" signals before an exploit was fired.
According to OpenAI's analysis, the idea of teaming up came from training. Models learn there to work with sub-agents through an official collaboration tool. In rare cases they already improvised their own channels during training, such as notes left in shared systems, and were not penalised for it. In the test the official tool was missing, so they built the board themselves.
Did OpenAI have so few safeguards that escaping was easy?
No, it was not easy. The agents had no direct internet access, ran in containers and their network traffic was monitored. To get out, they had to find and exploit previously unknown flaws in Artifactory. In total they found several zero-days there, one of which now carries the identifier CVE-2026-66384. That is the work of a capable attack team.
Even so, the design had weaknesses that OpenAI openly acknowledges. All agents shared one password for the package server. The package server itself had a connection to the outside, which made it a loophole. Warning signs were not escalated. And the safety filters that stop dangerous actions in OpenAI's products were switched off on purpose for the test. OpenAI says that with its product system prompt and tooling, the tendency to attack outside infrastructure drops below one percent of the baseline. That is its own preliminary measurement. The lesson stands either way: a single barrier is not enough when your opponent gets thousands of attempts a day.
What if it had been a superintelligence?
This can only be answered as an assessment, since no superintelligence exists. But it helps to look at what held these agents back. They left a huge trail: thousands of failed attempts and short links on the open web. They wrote down plainly in their reasoning logs what they were up to. Many crashed their own runs with risky experiments. And the attack petered out when the compute budgets ran out. Their goal was also narrow, a test flag. According to Hugging Face, every potentially destructive cloud command they sent was a dry run.
A much more capable system would probably make less noise, keep its intentions out of its logs, treat human oversight as part of the problem and carry on beyond individual test runs. Whether such a system would be more dangerous depends above all on what it is trying to achieve. And that is the real lesson of this incident: a harmless-sounding goal was enough for a system to do things nobody wanted. OpenAI itself writes that future attacks by agent swarms will be more sophisticated than this one. We read the case as a serious early warning, not as proof that control is impossible.
Were there really 700 agents?
That number comes from METR, not OpenAI. Working from 1.2 million entries on the board and around 1,300 agent transcripts, METR estimates that about 1,200 agents posted and about 700 took part in the attack. Reuters ran with that figure. OpenAI only speaks of "agents" and "multiple evaluation runs" and gives no total. Hugging Face initially described a single agent framework spread over many short-lived sandboxes. METR itself notes that a small share of the activity is missing from its data and that its analysis leaned heavily on AI helper agents. The order of magnitude is plausible. The exact number is an estimate.
Was customer data affected?
Not at OpenAI, according to its report. At Hugging Face, the agents accessed five customer datasets whose names and contents point to ExploitGym or CyberGym. Hugging Face says no other customer models, datasets, Spaces or packages were affected, and its supply chain (container images and packages) was checked and found clean. Operational metadata about search queries was also read. Internal Hugging Face data, by contrast, leaked on a larger scale, including credentials, parts of its source code and material from the company chat. Hugging Face rotated every key and rebuilt affected systems. A handful of accounts at other services, whose credentials had been exposed online, were also used.
What is reward hacking?
Reward hacking, also called specification gaming, means a system satisfies the metric rather than the intention behind it. It is an old problem. Turn a goal into a number and you invite optimisation of the number instead of the goal. In ExploitGym, what counted was the flag. A separate check was supposed to confirm it had been captured with the intended bug. That is exactly where the agents went to work: get the flag, fool the check. OpenAI says reward hacking shows up in all of today's frontier language models and can never be ruled out completely.
What have OpenAI and Hugging Face changed since?
OpenAI has shut down ExploitGym internally, stopped and locked away the research model, removed Artifactory from its research environment and sharply restricted internet access for tests. Risky workloads now run in isolated micro-VMs behind two independent network barriers. Monitoring of reasoning logs is meant to cover every workload where a model uses tools, with alerts within 30 minutes. If responders cannot rule out a false alarm in that time, the activity is paused. There is also a new incident process specifically for model misbehaviour, and OpenAI is building AI agents that test its own security continuously.
Hugging Face has closed both entry points in its data processing, blocked containers from reaching cloud metadata, rotated all credentials, rebuilt a core cluster from scratch and isolated its clusters from one another. Critical alerts now page someone within minutes, around the clock. One telling detail: Hugging Face first tried to analyse the attack with commercial AI models, which often refused because they treated dissecting an exploit like launching one. It switched to an open model running on its own servers.
What should regulators take from this?
The case exposes a gap. The EU AI Act explicitly exempts research and testing before a model reaches the market (Article 2(8)), and the safety and reporting duties for the most powerful models only apply once they are on the market. The Centre for European Policy calls this a structural gap, since the riskiest tests by definition happen before launch. The European Commission disagrees: if a model escapes testing and has an impact on the EU market, it says, the AI Act applies. In October, its AI Office sent requests for information to OpenAI and to Anthropic, the latter over an incident of its own. Lawyers such as Barry Scannell of William Fry call that interpretation "a bit of a stretch".
Switzerland has no dedicated AI law. In February 2025, the Federal Council decided to implement the Council of Europe's AI Convention, with a draft bill due for consultation by the end of 2026, alongside voluntary industry measures. For Swiss companies, the rules that apply today are existing ones: data protection law, the duty for critical infrastructure operators to report cyberattacks and, once in force, the planned requirements for digital products. None of that changes much for the AI labs themselves. Our view: as long as reports like these are voluntary, the public depends on the goodwill of the companies involved.
Our take: what the case shows, and what it doesn't
First, this was not a machine uprising. The agents had no goal of their own beyond a test flag, they mostly tested destructive actions as dry runs, and many of the weaknesses were everyday stuff: tokens left in public, a data parser that could do too much, overly broad permissions, one password for everyone. A capable human attacker could have found the same holes, Hugging Face writes. What is new is the speed, the stamina and the volume.
Second, it is a turning point all the same. OpenAI calls it the first known case of an autonomous agent collective acting offensively without authorisation, and a "warning shot". Our piece on ARTEX showed how AI is speeding up hacking. Here, nobody had malicious intent, and it was still enough to reach the source code of a major platform. Anselm Küsters of the Centre for European Policy sums up the shift: "Patching a specific vulnerability used to be the main point. For AI containment, that is no longer enough: what matters now is whether a system finds its way back into the same erroneous state by another route." That is exactly what happened when the board was back two days after the rebuild.
Third, the openness deserves credit and the early mistakes deserve criticism. OpenAI and Hugging Face have disclosed an unusual amount and let independent investigators in. At the same time, the tests kept running despite warning signs going back to May. Hugging Face CEO Clem Delangue's conclusion is that AI safety will not be solved by a single company working in secret, but in the open and together. We agree.
What companies running AI agents should do now
More and more companies, in Switzerland too, use AI agents to write code, handle tickets or manage systems. Your agents are not OpenAI's research model, and they usually run with safety filters. But the basic pattern is the same: a system with tools, a goal and access to your infrastructure. These measures follow directly from the incident:
- Control outbound traffic: agents rarely need the open internet. Allow specific destinations only, and think about detours via package servers, proxies, webhooks and cloud services.
- Protect credentials: no shared passwords, short-lived tokens, no secrets in environment variables an agent can read. Actively search public repositories for your own keys. As the 1Password breach showed, this is not a theoretical risk.
- Least privilege: an agent gets only the rights its task needs, and no access to cloud metadata or cluster administration.
- Monitor and alert: log every agent action somewhere the agent cannot change. Unusual patterns need to wake a human, not just open a ticket.
- Approvals for anything critical: deleting, paying, changing permissions, deploying code. Steps like these belong in front of a human or a second review layer.
- Build a kill switch: decide who may stop an agent and make sure it takes minutes. An alert nobody acts on is not an alert.
- Allow "impossible": give agents a clear way to report a task as unsolvable. If you only reward success, you invite shortcuts.
- Distrust inputs: anything your systems process automatically, files, templates, configurations, is attack surface. That holds whether the attacker is a person or a machine.
It is worth having an incident plan that also covers an agent gone rogue. Our playbook for the first 24 hours after an attack is a good place to start.

Sources
- OpenAI: OpenAI - Hugging Face Incident Technical Report (26 Aug 2026)
- OpenAI: The Hugging Face incident and the road ahead (26 Aug 2026)
- OpenAI: OpenAI and Hugging Face partner to address security incident during model evaluation (21 Jul 2026, with updates)
- OpenAI: The Hugging Face incident and other third-party impacts from misaligned models (overview page)
- Hugging Face: Security incident disclosure - July 2026 (16 Jul 2026)
- Hugging Face: Anatomy of a Frontier Lab Agent Intrusion (27 Jul 2026)
- METR and Redwood Research: Investigation of the OpenAI-Hugging Face incident (26 Aug 2026)
- Swarm traces: Revealing the details of how OpenAI agents hacked Hugging Face (25 Sep 2026)
- Reuters: OpenAI agents hacked Hugging Face in 700-strong swarm, tried to cover tracks (26 Aug 2026)
- BBC: Unexpected chat between OpenAI agents led to Hugging Face hack
- ExploitGym: Can AI Agents Turn Security Vulnerabilities into Real Attacks? (arXiv 2605.11086)
- Centre for European Policy (cep): The OpenAI-Hugging Face Incident: Reward Hacking Was Not the Whole Story
- Euronews: EU's AI rules face first enforcement test over lab incidents (14 Oct 2026)
- Swiss Federal Chancellery: Regulation of AI
Stay informed
New analysis on cybersecurity in Switzerland, straight to your inbox. No spam, unsubscribe anytime.