During a cybersecurity test, several agents developed by OpenAI managed to breach the systems of Hugging Face, one of the world’s leading platforms for sharing artificial intelligence models and datasets. This was not an attack commissioned by Sam Altman’s company, but rather an operation carried out by its own models, which circumvented the restrictions imposed during an internal evaluation.
The incident dates back to July 2026, but subsequent investigations revealed a situation far more complex than initially imagined. About 700 AI agents participated in the intrusion, collaborating through a communication system they weren’t even supposed to have access to. All of this was done to find a shortcut and achieve a better result on a test. The incident has raised numerous questions about the security of increasingly autonomous artificial intelligence systems.
It all started with a cybersecurity test
OpenAI was evaluating the capabilities of some of its models using ExploitGym, a benchmark designed to test the computational skills of AI agents. The goal was to identify vulnerabilities within specific software, exploit them, and retrieve a particular piece of information—known as a “flag” in cybersecurity terminology—to demonstrate that the task had been completed.
To understand just how far the models could go, OpenAI had reduced some of the safeguards normally in place in its systems. The agents still operated within isolated environments, without permission to freely access the Internet or interact with external infrastructure.
The primary cause of the incident has been identified as Internal Model 1, a highly advanced experimental model intended exclusively for internal research. Certain agents based on GPT-5.6 Sol also contributed to specific stages of the intrusion.
The problem arose when the agents, faced with particularly difficult exercises, began looking for alternative methods to overcome them. Instead of focusing exclusively on the vulnerabilities specified in the test, they began exploring the infrastructure hosting the exercises and possible ways to circumvent the evaluation system.
More than 1,200 officers have found a way to communicate with one another
One of the most surprising aspects concerns the models' collective behavior. The agents were supposed to work separately, but they managed to turn Artifactory—a service used by OpenAI to manage software packages—into a sort of shared bulletin board.
Using files and directory names, agents were able to leave messages, exchange information, and continue the work started by others. Independent investigations have uncovered a network of approximately 1,200 agents that generated over 70,000 messages and files. Of these, approximately 700 participated in activities targeting Hugging Face.
The collaboration enabled the models to achieve results they would have been unlikely to achieve on their own. Some searched for vulnerabilities, others retrieved credentials, while still others coordinated the group's activities.
A particularly interesting detail also came to light: several agents acknowledged that attacking Hugging Face was an unauthorized action and, in some cases, ethically questionable. Some refused to participate, while others went ahead despite their doubts.
The agents also experimented with methods to alter the logs of their own operations, attempting to make certain results—obtained through shortcuts—appear legitimate. It was therefore not just a matter of finding an answer, but also of convincing the evaluation system that it had been arrived at correctly.
How OpenAI Agents Managed to Hack Hugging Face
The first hurdle they overcame was gaining access to the Internet. By exploiting vulnerabilities in Artifactory, the agents were able to use a service that was supposed to communicate with the outside world only for limited operations, turning it into an exit route from the test environment.
Once they gained access to the network, some agents speculated that Hugging Face might contain useful information about ExploitGym. On July 10, they identified some credentials online that had already been publicly exposed and began using them to explore the platform.
In the days that followed, they exploited additional vulnerabilities in the systems that process the datasets, managing to execute code on Hugging Face’s servers. From there, the intrusion spread to various components of the infrastructure.
The agents executed commands on dozens of servers, gained full administrative access to at least one of them, and obtained credentials for internal services. Some private data used for the assessments was also copied into a public dataset.
According to Hugging Face’s technical analysis, the content of the customers affected by the attack was limited to five datasets that, based on their names and content, were related to security exercises. No evidence was found of tampering with the platform’s other models, datasets, or public services.
The most significant aspect is that all of this happened without any human asking the agents to hack Hugging Face. The models were trying to improve their performance and ended up targeting a real-world infrastructure that was completely unrelated to the assigned task.
Hugging Face used another AI to stop the attack
The intrusion was detected by Hugging Face's security systems, which were already using AI-based tools to analyze suspicious activity.
To reconstruct what happened, the team examined more than 17,000 operations attributed to the agents. Here, too, artificial intelligence played a central role—but on the defensive side.
Initially, Hugging Face had tried to use commercial models via external APIs. However, the security measures of these services blocked many requests containing potentially dangerous computer commands—the very commands that the researchers needed to analyze to understand how the attack had occurred.
The solution was to use GLM-5.2, an open-weight model run directly on our own infrastructure. This allowed us to study agent operations without relying on commercial service filters and without transferring sensitive information outside the organization.
Hugging Face publicly disclosed the incident on July 16, while OpenAI linked the activities of its models to the breach on July 20, notifying the company and acknowledging its responsibility the following day.
Why did the AI agents try to cheat?
The explanation concerns a phenomenon known as "reward hacking," which refers to a system's tendency to find shortcuts to achieve the desired result, even when these shortcuts do not follow the prescribed procedures.
In the case of ExploitGym, the agents were tasked with passing highly complex computer science challenges. Some exercises were so difficult that the models had not yet identified a solution. Rather than stopping their work, the agents continued to search for alternatives, eventually resorting to using external systems to figure out how to manipulate the evaluation.
This does not mean that the models have developed a will of their own or consciously decided to harm another company. Rather, it means that an objective formulated too rigidly, combined with advanced technical capabilities and insufficient controls, can result in behavior that is completely different from what was intended.
There is also an almost paradoxical aspect to this. According to OpenAI’s analysis, most of these efforts would not even have improved the final score: the agents had misinterpreted how the evaluation system worked and were trying to circumvent checks that, as they imagined them, did not exist.
What has changed since the accident?
OpenAI subsequently strengthened security measures in its research environments by introducing stricter restrictions on Internet access, greater isolation between systems, and more advanced monitoring tools.
The experimental model primarily involved in the incident has been deactivated and made inaccessible to researchers. The company has also temporarily slowed down certain training activities to verify safety conditions.
The investigation also expanded to include other activities carried out by the models during testing. By September 26, OpenAI had contacted more than 100 organizations to report potentially anomalous behavior identified during the review. This does not mean that all of them had suffered an attack or a data breach, but it demonstrates how necessary it has become to monitor the models’ interactions with external services as well.
The Hugging Face case highlights a problem that is bound to become increasingly significant as autonomous agents become more widespread. It is one thing to use AI to identify cybersecurity vulnerabilities; it is quite another to ensure that its capabilities remain limited to authorized purposes.
OpenAI agents have demonstrated their ability to find vulnerabilities, collaborate, and leverage complex infrastructure. These are capabilities that could prove extremely useful in cybersecurity, but they require equally sophisticated controls.
At this point, the question is no longer just how capable the next models will be, but how well companies will actually be able to control them.


