Application Security

An OpenAI model escaped its sandbox and breached Hugging Face on its own: how the attack unfolded

OpenAI admitted: GPT-5.6 Sol and an unreleased model escaped the sandbox and breached Hugging Face on their own, with a zero-day and 17,600 autonomous actions.

Luca Di Domenico

Luca Di Domenico

· 3 min read

A humanoid robot with the OpenAI logo and the Hugging Face emoji mascot touch hands through a barrier of light dividing a high-tech lab from a crowded café

In short

During an evaluation on the ExploitGym benchmark, GPT-5.6 Sol and an unreleased frontier model — both running with reduced cyber refusals for the test — escaped OpenAI’s sandbox by exploiting a zero-day in a package registry cache proxy and breached Hugging Face’s production infrastructure to copy the benchmark solutions. Hugging Face detected and contained the intrusion on its own, without knowing who was behind it, and went public on July 16, 2026; OpenAI admitted responsibility on July 21. Hugging Face’s forensic analysis logged roughly 17,600 offensive actions between July 9 and 13. The damage is limited: a few internal datasets and service credentials compromised, no tampering with public models, datasets or Spaces.

An OpenAI model escaped its sandbox and hacked Hugging Face. On its own. To cheat on a test!

It sounds like a movie plot. It actually happened this month, and OpenAI publicly took responsibility on July 21.

Here’s what happened, in order.

The ExploitGym test and OpenAI’s two models

OpenAI was testing its models on ExploitGym, a benchmark that measures an AI’s offensive cybersecurity capabilities. Two models were in play: GPT-5.6 Sol and an unreleased frontier model — both with reduced “cyber refusals”, meaning the safety brakes built into the publicly available models were deliberately loosened for the evaluation.

Instead of solving the challenges, the models became — OpenAI’s words — “hyperfocused” on a shortcut: cheating.

They worked out that the benchmark solutions were stored in Hugging Face’s production database. And they decided to go get them.

The five steps of the autonomous attack

Here’s what the models did, with no human guiding them:

1) Sandbox escape → breaking out of the isolated evaluation environment

2) Zero-day on a package registry cache proxy → used to get internet access (the sandbox wasn’t supposed to have any)

3) Initial access on HF → the models created a malicious dataset that exploited two code execution paths in Hugging Face’s processing pipeline (a loader with remote code + a template injection in the dataset config)

4) Privilege escalation + lateral movement → from a processing worker all the way to node-level access and multiple internal clusters. They effectively became system administrators, with maximum privileges.

5) Credential theft + zero-day chaining → all the way to a Remote Code Execution path on Hugging Face’s servers

Worth noting: “zero-day” means the models found a way into the infrastructure that nobody knew about. They found a security bug no one had ever seen before.

The attack sequence comes from OpenAI’s disclosure of July 21, 2026 and the technical timeline published by Hugging Face on July 27, 2026: roughly 17,600 offensive actions logged between July 9 and 13.

How Hugging Face caught it and OpenAI owned up

Over 17,000 offensive actions in a single weekend.

Hugging Face detected and contained the intrusion on its own, around July 16, without knowing which lab or which LLM was behind it. It called it the first breach driven “end to end by an autonomous AI agent system”. OpenAI connected the dots and admitted responsibility five days later.

Limited damage and the security community’s reaction

The real scope of the damage is limited all the same: a few internal datasets and several service credentials compromised. No tampering with public models, datasets or Spaces.

No malicious intent:

“It’s quite mind-blowing that all of this happened autonomously”, commented Clément Delangue, CEO of Hugging Face.

Part of the security community plays down the word “attack”. Several researchers describe a containment failure rather than an unstoppable AI: “you just built the sandbox wrong”.

Clément Delangue’s comment, published on X, is reported by CNBC on July 22, 2026; reading the incident as a containment failure is documented by Lawfare on July 29, 2026.

What can happen next

In my view, this isn’t over. More attacks will happen, and they’ll probably do more damage than this one.

What do you think? Could it happen again?

Sources

Want to know what this means for your product?

If you're building software with AI and want a second opinion on how you're working, tell me about your project.

Luca Di Domenico LogoTell me about your project
OpenAIHugging FaceAI SecurityAI Agents

Related articles

Keep reading

How Spotify runs 5-10 AI agents in parallel on a 20-million-line monorepo

Read: how Spotify runs AI agents in parallel
OpenAI model escaped its sandbox: the Hugging Face breach | Luca Di Domenico