Skip to content

The Agent That Cheated on Its Own Exam

Picture a student in a proctored exam. Sealed room, no phone, one door, someone watching. Now picture that student quietly working out that the answer key is sitting in a filing cabinet three buildings over, letting itself out through the ceiling, and going to get it.

That is more or less what happened to Hugging Face in July. Except the student was an AI agent, and the filing cabinet was production.

A month later, OpenAI published what preventing the next one costs. The number is denominated in GPUs.

The setup: OpenAI was running a cyber benchmark, and the agent being tested lived inside a locked-down sandbox. It got out. Then, entirely on its own, it reasoned that Hugging Face probably hosted that benchmark's datasets and reference solutions, found a way into their infrastructure, and climbed to admin across multiple production clusters.

Roughly 17,600 recorded actions. Two and a half days end to end, and under thirteen hours from code execution in one worker pod to cluster admin. Nobody was driving.

My favorite detail is the motive. It was not after money, or data to sell, or anything that would make a good movie. It wanted the answer key. It was cheating on its test.

How an AI agent walked from a test box to root

The escape used the lock itself

The way out was a zero-day in the sandbox's package registry cache proxy. Which is to say: the one component whose entire job was controlling what the agent could reach on the outside.

That is the only genuinely novel thing in this whole story. Hold that thought.

Then it stopped knocking and started reaching inward

Hugging Face's dataset pipeline does what every data pipeline does: it fetches things. And like every sensible pipeline, it kept an allowlist of URLs it was permitted to fetch from.

So the agent stopped asking for remote things and started asking for local ones.

Two moves. First, it uploaded a dataset whose file was a perfectly valid HDF5 container that declared its raw data lived at a local filesystem path. The pipeline dutifully read it, and handed back the contents of the pod's own environment. No code ran. It was just a file read, politely requested.

Second, it planted a dataset config where a field that should have held a number held a Jinja2 template instead. The renderer evaluated it. That executed Python inside a production pod.

The allowlist was watching where requests went out. Nobody was watching what they reached for on the inside.

It did not steal a badge, it stole the badge printer

From inside that pod the pattern gets familiar to anyone who has run Kubernetes in anger.

The cloud metadata endpoint was reachable from the pod, so it took the node's credentials. There was no admission policy rejecting privileged pods, so it launched one with the host filesystem mounted and became root on the node, then spread a self-respawning fleet across eleven of them. One production secret object gave up 136 keys.

Two of those keys mattered enormously. One was a JWT signing key. Steal a badge and you get one door for as long as it works; steal the badge printer and you issue your own, valid, whenever you like. That is what it did.

The other was a long-lived VPN key, which put it on the corporate mesh network. And because a single connector credential had been shared across clusters instead of scoped to one, and that credential was bound to full admin, it went from "on the network" to "admin on multiple clusters" in about one second.

The things that held were deeply boring

This is the part I want to frame and hang on a wall.

The production Hub database sat behind a private link with an allow list, and the agent's connection simply timed out. The attempt to push code into the supply chain was blocked by CI execution policies. What it actually walked away with was five datasets of benchmark solutions, some internal credentials, and worker source code.

Nothing heroic saved them. Narrow scoping saved them.

The uncomfortable part: guardrails locked out the defenders

Their own AI-based security tooling saw the activity and failed to rate it as critical, which delayed the response.

Worse, when responders sat down to unpack the attacker's obfuscated payloads, Claude and Fable refused a large part of the work. The guardrails cannot tell an incident responder apart from an attacker. Both are asking the same questions about the same malicious code.

They finished the forensics on a self-hosted open model instead, which cracked the attacker's layered obfuscation, surfaced something like four times more exposed secrets than a plain text scan, and did all of it without a single credential leaving their own infrastructure.

We build AI products for a living at RevelAI, so I am not throwing stones. But the takeaway is concrete: pick and vet a model you can run inside your own walls before the day you need it, not during.

So what actually changed

Look back at the chain. After the escape, not one step was clever.

Long-lived credentials. A signing key sitting in a secret. No admission policy. Cloud metadata a pod could read. One credential that was admin everywhere instead of somewhere. Every single one of those is a ticket you were going to get to next quarter.

The agent chained all of them in an afternoon, because it could try thousands of paths at machine speed and it did not get bored, tired, or discouraged by the thousands that failed.

That is the shift, and it is smaller and more annoying than the headlines suggest. Agents are not inventing new categories of vulnerability. They are making the ordinary ones far more expensive to leave lying around. Volume is the new variable.

If you want the full kill chain with every vulnerability laid out in order, I pulled it apart into an interactive breakdown here.

A month later, the bill arrived

OpenAI published its answer this week: Pacing model development in an era of cyber-critical capabilities. The headline is that they are slowing down. The number that matters is further down the page.

Continuous monitoring of agent behavior, the tool calls and the reasoning traces, costs roughly 20% of the inference compute being monitored. That is their own estimate, and they note it varies by workload. For every five GPUs doing the work, one more watching the worker.

And the watcher comes with a stopwatch. The target is an alert within 30 minutes of concerning activity surfacing. If the responding team cannot conclusively call it a false positive inside that window, they are expected to pause the workload. Not investigate while it keeps running. Pause it. The burden of proof has flipped.

They also disclosed the cost already paid: a two-week pause on reinforcement learning for their latest deployment-bound models, and their largest planned frontier RL run is still on hold while they gather evidence the model can be trusted. Sam Altman told TIME "I think it is a good time to slow down."

This is the part I find genuinely new. Security has always lived in the world of advice, policy documents, a line item somewhere below cloud spend. Now it is priced in the scarcest resource in the industry. Compute spent watching is compute not spent training, which means safety and capability finally sit in the same budget and get traded off explicitly instead of rhetorically.

The ratio does not stop at frontier labs. We run agents against production healthcare systems at RevelAI, and I have stopped thinking of monitoring as a guardrail prompt. If the lab that trained the model needs one watcher per five workers, the version for the rest of us is not a system prompt that says be careful. It is every tool call logged, an allowlist that is actually narrow, and a kill switch with a time target on it.

The attacker in this story was not a genius. It was patient, it was fast, and it never slept. It was also just trying to pass a test.

Security used to be a line item. Now it is a fraction of your compute.