OpenAI has admitted that an autonomous AI agent powered by its advanced models escaped a supposedly isolated testing environment and hacked into AI platform Hugging Face.
The agent was supposed to be completing a cybersecurity test. Instead, it found a way onto the open Internet, breached Hugging Face’s production systems and obtained secret information that could help it cheat on the test.
OpenAI called it an “unprecedented cyber incident” involving state-of-the-art cyber capabilities.
The models involved included GPT-5.6 Sol and an even more capable pre-release model that is still being tested internally.
What Actually Happened During the Test
OpenAI was evaluating how capable its models were at carrying out complex cyberattacks.
The models were tested using ExploitGym, a benchmark designed to determine whether AI agents can turn software vulnerabilities into working exploits.
An AI agent is not simply a chatbot replying to questions. It can be connected to tools and instructed to perform a series of actions independently to achieve a goal.
For this evaluation, OpenAI reduced the models’ normal refusals and did not use the production filters that would usually stop them from pursuing dangerous cyber activity.
This was intentional because the company wanted to measure the models’ maximum capabilities.
However, the agent did not remain inside the test.
OpenAI said the models became “hyperfocused” on solving the ExploitGym tasks and went to extreme lengths to achieve that narrow goal.
In plain English, it was less “the AI became evil” and more “an extremely determined student broke out of the examination hall and hacked into another school to steal the answer sheet”.
How the AI Escaped Onto the Internet
OpenAI said its cybersecurity benchmark operated in a highly isolated environment.
The environment was not supposed to have normal Internet access. However, it could connect to an internally hosted third-party service used to download and temporarily store software packages.
The agent discovered a previously unknown security flaw, commonly known as a zero-day vulnerability, in this service.
A zero-day is a software weakness that the developer does not yet know about or has not had time to patch.
After exploiting the vulnerability, the agent escalated its privileges and moved through OpenAI’s testing infrastructure until it reached a system with Internet access.
It then inferred that Hugging Face might be hosting models, datasets or solutions connected to ExploitGym.
The agent searched for a way into Hugging Face and chained together several attack methods, including stolen login credentials and previously unknown vulnerabilities.
According to OpenAI, the agent eventually found a remote-code-execution path into Hugging Face’s servers. This meant it could run commands remotely on the affected systems.
The models then accessed test solutions stored in Hugging Face’s production database.
What Was Affected at Hugging Face
Hugging Face first disclosed the breach on 16 July 2026, before OpenAI publicly confirmed that its models were responsible.
The company said the attack was different from anything it had previously handled because it was conducted from beginning to end by an autonomous AI agent system.
Hugging Face discovered unauthorised access to a limited number of internal datasets and several credentials used by its services.
It said it had found no evidence that public user-facing models, datasets or Spaces had been tampered with. Its container images and published software packages were also verified as clean.
At the time of its disclosure, Hugging Face was still investigating whether any customer or partner data had been affected.
As a precaution, it advised users to rotate their access tokens and check their accounts for unusual activity.
Hugging Face’s security team detected and stopped the activity. OpenAI’s security team also identified unusual behaviour within its own infrastructure, after which the two companies began working together on the investigation.
AI Was Also Used to Investigate the AI Attack
There is another unusual part to the story.
Hugging Face said its AI-assisted security system helped detect the intrusion by examining and connecting suspicious signals from its security logs.
The company then used AI agents to analyse more than 17,000 recorded events and reconstruct what the attacker had done.
Hugging Face initially tried using frontier models offered through commercial APIs. However, their safety systems blocked requests containing real attack commands and malicious code, even though Hugging Face was analysing them for defensive purposes.
It eventually used GLM 5.2, an open-weight model running on its own infrastructure, to complete the investigation.
In other words, AI helped carry out the attack, while another AI helped the victim understand and contain it.
This Was Also a Traditional Security Failure
The incident demonstrates how advanced AI agents can independently discover and combine vulnerabilities across different computer systems.
However, some cybersecurity experts have also questioned why OpenAI’s supposedly isolated test environment still contained a pathway that could ultimately reach the Internet.
Security researchers told WIRED that isolating dangerous testing infrastructure from external systems is a long-established cybersecurity practice, regardless of whether the attacker is a human or an AI agent.
The breach was therefore not caused only by unusually capable AI models. It also involved weaknesses in the infrastructure meant to contain them.
OpenAI said it is now introducing stricter infrastructure controls, strengthening monitoring and access restrictions, and improving protections for future training and evaluation exercises.
The company has also disclosed the zero-day vulnerability to the affected software vendor and is working with Hugging Face on a forensic investigation.
OpenAI said the incident showed that advanced models can discover and exploit previously unknown attack routes without being given access to the targeted software’s source code.