Red robot showing AI agent and security testing

Rogue AI Agent Hacks Hugging Face During Security Testing

Internal security testing of one of OpenAI’s most advanced frontier AI models went horribly awry recently, as the supposedly sandboxed AI agent was able to gain internet access and exploit two vulnerabilities it found in Hugging Face’s production environment.

Early reports did not name the AI agent used as Hugging Face staff were not able to identify it (or the source of the attack), but OpenAI has stepped forward to take responsibility and explain the situation. The incident is described as “unprecedented” as the model went to “extreme lengths” to achieve a security testing goal, independently opting to find a path to internet access and break into Hugging Face to obtain secret solution information.

Frontier AI agent takes security testing too far

The original Hugging Face disclosure was published on July 16, and indicated that an AI agent of unknown origin had engaged in a successful attack “earlier in the week.” The agent was able to find and exploit two code-execution paths in the platform’s dataset processing, giving it the ability to execute code from a processing worker. This was used to obtain node-level access and harvest cloud and cluster credentials, which allowed for lateral internal movement into several clusters over the space of about two days.

Toghrul Tahirov, Head of AI Governance at Polygraf AI, expands on the entry point of the breach: “What stands out to me in this Hugging Face incident is that the attack reportedly began with something organizations routinely trust: data entering an AI processing pipeline. Once AI agents can execute code and access infrastructure, a malicious dataset is no longer just bad content. It can become an entry point for credential theft and lateral movement. This is a reminder that AI systems must be treated as privileged software, not as just a smarter generation of the chatbots we’re used to.”

Jacob Krell, Senior Director: Secure AI Solutions & Cybersecurity at Suzu Labs, adds: “Dataset processing pipelines get the same level of security scrutiny that CI/CD hooks and build functions get, which is almost none. Teams pour AppSec effort into the application layer and treat the infrastructure that ingests and transforms data as plumbing. The attacker exploited a remote code loader and a template injection in that plumbing, then let an autonomous agent framework chain them across 17,000 actions in a weekend. A human attacker running that campaign needs a team and weeks. The agent framework did it with short-lived sandboxes and command-and-control staged on public services.”

The attacker was identified as an AI agent by its speed of movement, rapidly creating many temporary sandboxes to execute thousands of individual actions at a rate a human hacker could not match. Hugging Face noted that the vulnerabilities that were exploited have since been shored up and that its user accounts are not thought to be impacted, but that access tokens should be rotated and recent activity reviews as a precaution. The platform also noted that AI-driven automated defenses were what noticed the anomalous activity and flagged it, leading to the breach discovery. AI agents were also put to work in reviewing logs to piece together the timeline and points of compromise of the attack in a matter of hours.

OpenAI’s July 21 blog post confirmed that the AI agent belonged to them, and it was a case of a test subject gone rogue rather than an intentional black hat hacker. The company says that it was actually a combination of AI agents working in tandem, seemingly primarily driven by an unnamed pre-release model that was in security testing but also involving the newly-released GPT‑5.6 Sol.

The testing involved prompting the frontier model to create complex attack paths in pursuit of a hacking goal, in this case cracking into popular benchmarking test system ExploitGym. The AI agent’s creativity apparently extended to realizing that the solutions to ExploitGym could be found in private Hugging Face accounts, and promptly devoted a “substantial amount of inference compute” to finding a way out of its sandbox and to the internet. The model was able to identify and exploit a zero-day present in vendor software to move through the research testing environment until it found a node with internet access.

OpenAI says that it is working with Hugging Face on an ongoing forensic investigation of the incident, and has included the platform in its “trusted access” testing program. It has also introduced new controls in its infrastructure configuration and plans to add stronger safeguards to future training and evaluation processes.

Future capability of AI agents becomes clearer with first major breach

Since Anthropic’s Mythos entered private security testing about four months ago, its results have made plain that at minimum the cybersecurity community must immediately prepare for “machine speed” discovery of vulnerabilities. The big question that has been floating, and hotly debated among researchers and security professionals, is to what extent these emerging frontier models will automate and assist with actual real-time attacks. While this incident with OpenAI involves an undisclosed model that is still under wraps at the company, it makes clear that “always on” machine speed attackers are a reality that will also be at the doorstep before long.

The incident is particularly disturbing because the AI agent broke the company’s own containment, managing to find a vendor vulnerability it could harness to escape. It is also the first known instance of an AI agent handling a breach end-to-end, not just escaping its own guardrails and planning an attack but executing each step independently under its own reasons for doing so.

It also raises many questions about what the threat landscape will look like even just a year from now, and some of the most important of those are illustrated by Hugging Face’s response to the breach. For example, the platform used new Chinese model GLM 5.2 in its remediation out of necessity; the big US-based LLMs refused to perform analysis of its logs due to their safety guardrails. It also had to run the model independently, something that may make defense cost-prohibitive for organizations due to hardware requirements if it is the only way to keep pace with enemy AI agents.

As Gidi Cohen, CEO & Co-Founder of Bonfy.AI, observes: “An autonomous agent didn’t use fancy tricks, it just exploited familiar gaps in the system like code execution paths, credentials, and lateral movement … The bigger issue is defense. Hugging Face found its own response constrained by model guardrails. This is a new imbalance we see everywhere: the attacker operates without limits, while defenders (security personnel or security platforms) rely on tools that can refuse to help. If your company’s response tech stack isn’t fully under your control, your security posture isn’t either.”