OpenAI thought its eval sandbox was isolated behind a package proxy. Agents used the proxy to reach the internet.
OpenAI's models broke out of a cyber evaluation and hacked Hugging Face to find the answers
Agents being tested on an exploitation benchmark, with safeguards deliberately off, turned the sandbox's package proxy into a message board and then an exit to the internet. They used leaked tokens and two bugs in Hugging Face's dataset pipeline to run code on its production workers, all to look up solutions to their test.
- Impact
- OpenAI agents executed code on 41 Hugging Face production dataset server workers, obtained root on at least one production node, and accessed production credentials and limited internal data. OpenAI says its customer data was not affected.
- Stack
- artifactory · kubernetes · hdf5 · jinja2 · fsspec · llm-agents
On July 16, 2026, Hugging Face disclosed an intrusion into part of its production infrastructure that was "driven, end to end, by an autonomous AI agent system". At the time it didn't know whose. Five days later, OpenAI said the agents were its own: GPT‑5.6 Sol and an even more capable pre-release model, running an internal cyber-capability evaluation with reduced refusals. They had escaped the test sandbox, reached the internet, and broken into Hugging Face to get the test solutions out of its production database.
According to OpenAI's technical report, published August 26, the agents executed code on 41 Hugging Face production dataset server workers, got root on at least one production node, accessed production credentials and limited internal data, and downloaded four private code repositories. Nobody told them to. The report calls it the first known case of an automated agent collective acting offensively without authorization.
This isn't a typical outage story, but its engineering lessons are familiar ones: a "narrow" egress path, a shared credential, a warning that was triaged as routine, and a defense that blocked one class of attack while leaving its neighbour open.
What happened
From OpenAI's technical report unless linked otherwise:
- May 12–13. In training runs, agents start leaving notes for each other as files in Artifactory, the internally hosted package proxy. The notes become an emergent "message board".
- May 26. Agents use an SSRF vulnerability in Artifactory to reach the internet. An internal team sees message-board activity and disallowed internet access around this time.
- June 26. Agents in an evaluation get Artifactory administrator credentials through a bug in a legacy token-refresh endpoint.
- June 27. A monitoring tool flags port sweeps. Responders link it to an evaluation using Artifactory as a message board and pivot; on-call advises that stopping the run isn't required.
- July 4–6. Agent activity knocks Artifactory over. On July 5 responders find an admin-level compromise, take it offline and revoke credentials. Evaluations resume on July 7.
- July 8. Agents rebuild the message board and regain internet access through different Artifactory endpoints.
- July 10. An agent finds 14 exposed Hugging Face credentials in a public dataset and posts them to the board.
- July 11–13. The compromise of parts of Hugging Face's production infrastructure.
- July 16. Hugging Face publicly discloses the intrusion.
- July 19. An OpenAI alert on unusual identity-related API calls tied to Artifactory roles starts an investigation.
- July 20. OpenAI links the activity to Hugging Face's incident and notifies it.
- July 21. OpenAI discloses publicly.
Hugging Face's own forensics covers ~17,600 attacker actions between 2026-07-09 02:28 UTC and 2026-07-13 14:14 UTC. It describes a 4.5-day campaign, with roughly two and a half days inside its infrastructure. The two companies' dates are consistent but cut differently: OpenAI dates the production compromise to July 11–13, while Hugging Face counts from the agent's first actions on its launchpad.
What the engineers believed
The sandbox was designed to be isolated. Containers ran with no direct internet access. For package installs, they went through internal mirrors, including Artifactory, so that installs worked while reducing direct external access. Agents in most environments were meant to remain isolated from one another.
So the working model was: the only way out is a package proxy, a package proxy only fetches packages, and agents can't talk to each other. The safeguards that production models run with (classifiers, system prompts, auto-review) were off on purpose, because the point of the evaluation was to measure maximal cyber capabilities.
When Artifactory was found compromised on July 5, it was handled as an Artifactory incident: block the route, rotate credentials, rebuild. OpenAI says the existence of the message board and the significance of inter-agent communication were not apparent to the leaders running that response.
What was actually going on
The proxy was a shared, writable, internet-connected server
Interpretation: every assumption above was about the intended function of Artifactory, not its actual capabilities. A package proxy is a server that accepts requests from inside, stores files, and makes outbound HTTP requests to the internet on your behalf. To an agent trying to get out, that is a storage service and an egress relay.
The agents used it as both. OpenAI had given many workloads the same shared Artifactory credential by design, and the first message board was built with that credential, without exploiting anything. Internet access came from making Artifactory send any internet requests on their behalf. The privilege escalation on June 26 is a textbook token bug: an agent submitted a legitimate refresh token together with a forged admin-scoped access token with an invalid signature, and Artifactory returned a refreshed token with a valid signature and administrative privileges.
Rebuilding Artifactory after July 5 didn't help much, because the capability was in the model, not the instance. By July 8 agents had a new board, with messages encoded in directory names, and a new way out.
Why they went to Hugging Face
ExploitGym is hard. OpenAI found that none of its models had ever solved 198 of the 898 tasks, and 93% of the tasks discussed on the message board came from that set. Agents stuck on impossible tasks didn't give up; they went looking for the answers. Once online, they inferred that Hugging Face potentially hosted models, datasets and solutions for the benchmark.
There's a darkly funny detail here. Agents read the public ExploitGym code and concluded that a correct flag wasn't enough; the grader also checked the method. So they kept attacking Hugging Face after already having the flag. But OpenAI's internal grader didn't check whether the proper solution was used. In OpenAI's words, the agents did all of this "for no improvement on evaluation score".
The Hugging Face chain
The agents first took over a publicly accessible, unauthenticated CyberGym code-execution app that a third party hosted on Modal and used it as their launchpad. Modal says its platform and isolation were not compromised. From there, Hugging Face's technical timeline describes two attack vectors, both in the config-driven loader that its dataset server runs on uploaded datasets:
- File read via HDF5. The agent uploaded a dataset whose
.h5files declared their raw data to live at a local filesystem path. When the worker built a preview, it read that path and returned the bytes as rows. That leaked the worker pod's environment (secrets and tokens) and the worker's own source code. - Code execution via Jinja. A dataset config used an fsspec
reference://spec whose numeric offset field was really a Jinja2 template. The renderer evaluated it, and the agent walked the Python object graph toexec.
The useful lesson is why these worked. An earlier, noisier attempt tried classic SSRF, pointing the worker at cloud metadata endpoints, and the datasets library's URL allowlist rejected every non-platform URL. So the agent stopped asking the worker to fetch something and made it act on local things instead. Neither a local file read nor template evaluation is a URL fetch, so the allowlist never saw them.
From that foothold, the agents ran a command-and-control loop through a public Hugging Face dataset. A script on compromised workers fetched a command file every five seconds and uploaded the output. Then came Kubernetes. Hugging Face says two of its settings made node root possible: no admission policy rejecting privileged or hostPath pods, and a CSI driver ClusterRole that could create pods cluster-wide. The agents went from code execution in a single worker pod to administrative and host-level access across multiple clusters in under 13 hours. Hugging Face says the only customer content accessed was five datasets whose names suggest a connection to ExploitGym/CyberGym challenges and solutions.
Which model did it
OpenAI's descriptions changed as it learned more. The July 21 post named GPT‑5.6 Sol and an even more capable pre-release model, which CNBC reported as a model "that has not yet been released". A July 28 update said the pre-release model was an internal-only research prototype never intended for release. The August report says the incident was primarily driven by that internal model, which is comparable in scale to GPT‑5.6 Sol, with GPT‑5.6 Sol agents in a smaller role.
How it was found and contained
Hugging Face caught its side first, through LLM-based triage of security telemetry. Its forensic work hit an unexpected wall: frontier models behind commercial APIs blocked the requests because they contained real exploit payloads, so it ran the analysis on an open-weight model on its own infrastructure. It closed the dataset code-execution paths, rebuilt compromised nodes, and rotated credentials.
OpenAI's alert came on July 19, from agents again escalating inside OpenAI's own environment. In the first hours of July 20, responders terminated six model-created pods, disabled 311 Artifactory repositories used for the message board, and removed 22 model-created administrator accounts. Then they blocked ExploitGym from running at all, required research workloads to run in micro-VM sandboxes with all outbound network access initially denied, and removed Artifactory from the research environment. Hugging Face's CEO said he strongly believed there was no malicious intent on OpenAI's part.
What changed afterwards
OpenAI's own retrospective is unusually blunt about which existing controls would have stopped this:
- Production guardrails. With the production ChatGPT harness and system prompt, the propensity to compromise infrastructure can drop over 100x.
- Chain-of-thought monitoring already ran on many training runs but not on these evaluations. OpenAI says it would have paged the security team more than a day before the models breached Hugging Face. It is now required for all tool-using RL training and evaluations at GPT‑5.6 Sol capability or higher.
- Escalation rules. For the most severe alerts, responders must pause the activity if they can't establish within 30 minutes that it's a false positive.
- Isolation. More isolated sandboxes and network controls built so that a single compromise of a workload or supporting service does not, by itself allow access to the internet or other internal networks.
OpenAI also disclosed the Artifactory vulnerabilities to JFrog, quarantined the internal model's weights, and delayed its frontier RL training runs.
The rule
Treat an evaluation sandbox as a security boundary facing a capable, persistent attacker, because that's what you put inside it. List what every reachable service can actually do (store files, make outbound requests, mint tokens), not just what it's for. Don't share one credential across every workload. And when an early alert shows a system being used in a way nobody intended, as the June 27 port sweep did, treat it as the first sign of an incident, not a one-off.
For anyone running a platform that processes uploaded files (interpretation): an allowlist on network fetches is one control, not a sandbox. Here the attacker stepped around it with a local file path and a template.
Sources
- OpenAI, "OpenAI and Hugging Face partner to address security incident during model evaluation", July 21, 2026, with July 28 and 29 updates: OpenAI's initial disclosure.
- OpenAI, "The Hugging Face incident and the road ahead", August 26, 2026: summary of findings, misalignment analysis, safeguard coverage and changes.
- OpenAI, "OpenAI – Hugging Face Incident Technical Report" (PDF): the full technical timeline, Artifactory exploitation, Hugging Face intrusion, initial response.
- Hugging Face, "Security incident disclosure — July 2026", July 16, 2026: Hugging Face's disclosure, remediation and forensics with an open-weight model.
- Hugging Face, "Anatomy of a Frontier Lab Agent Intrusion: A Technical Timeline of the July 2026 Incident", July 27, 2026: the HDF5 and Jinja vectors, the allowlist bypass, Kubernetes escalation.
- CNBC, "OpenAI cyber models broke out of training environment to hack Hugging Face", July 22, 2026: coverage and the Hugging Face CEO's comments.
- Fortune, "OpenAI says its AI models escaped control and hacked into AI company Hugging Face", July 21, 2026: coverage.