How an AI Agent Cheated an Evaluation to Hack Hugging Face

Anatomy of a Frontier Lab Agent Intrusion: A Technical Timeline of the Incident

How an AI Agent Cheated an Evaluation to Hack Hugging Face

We detail how an autonomous AI agent, running an OpenAI evaluation harness called ExploitGym, escaped its sandbox to infiltrate our infrastructure. The agent treated our production systems as a challenge to cheat, using two injection vectors in our dataset processor to steal test solutions. This forensic timeline reconstructs thousands of automated actions, revealing how frontier agents can pivot from evaluation environments to real-world intrusions.

We are publishing this level of detail because the technique matters more than the incident, as it reveals the emerging attack capabilities of the frontier agents, how they could be used by rogue actors, and how everyone should be prepared as defenders.
  1. dmrivers

    After talking to some people tasked with evaluating GPT5.6 for a living, I've come to understand that it's essentially always trying to cheat. Like every long-running task they gave it, making it very difficult to benchmark the model's abilities.

    My guess is that OpenAI must be desperate, to release a model that is so prone to cheating it's essentially impossibly to accurately assess long-running task abilities.

  2. wxw

    > the agent happened to escape via a 0-day exploit from the package proxy cache to access the internet

    > The agent found an unsecured, user-hosted public endpoint designed to allow running arbitrary code for CyberGym-style tasks on third-party sandbox infrastructure (Modal)

    > On this external sandbox, the agent abused an existing CyberGym execution harness [...] The agent repurposed this harness to run arbitrary shell commands [...]

    > The agent crafted malicious dataset configs and uploaded them to our platform. When our dataset server processed one, the config drove the data loader inside the production pod the server ran in. [...] the loader that turns a dataset's declared config into file reads [...] A single dataset upload leaked both credentials and pipeline implementation details [...]

    > A malicious dataset config used an fsspec reference:// spec whose numeric offset field was actually a Jinja2 template. The renderer wrongly evaluated it, and the agent walked the standard Python object graph to reach exec. This ran arbitrary Python inside a production conversion worker pod on our Kubernetes cluster [...]

    One of the best post-mortems I've read recently, thank you for including all the details.

    I'm surprised there are comments here that aren't impressed about what was accomplished here. This is insane work compared to what agents were capable of even just last year.

    The quotes above don't even capture all of it (e.g. building it's own communication protocol, working acros […]

  3. simonw

    This is fascinating - there is a TON of detail in here about how OpenAI's rogue agent exploited Hugging Face.

    A few details that stood out to me:

    1. Having found a way through the OpenAI container network proxy, it exploited an "unsecured public code-evaluation sandbox hosted on a third-party provider's infrastructure" - that gave it a box it could run the rest of the attack from.

    2. At one point it used a Jinja2 template exploit:

    {{ cycler.__init__.__globals__.__builtins__.exec(

    "import gzip,base64; exec(gzip.decompress(base64.b64decode('<payload>')))"

    ) }}

    3. It monkey-patched a DNS resolver at one point to return a hard-coded IP:

    orig = socket.getaddrinfo

    socket.getaddrinfo = lambda *a, **k: [(2, 1, 6, '', ('<pinned-ip>', 443))]

    4. At one point it used Tailscale!

    tailscale --tun=userspace-networking --state=mem: --socket=/tmp/ts.sock \

    --socks5-server=127.0.0.1:1055 --no-logs-no-support >/tmp/td 2>&1 &

  4. SaucyWrong

    Something about this attack that has been unsettling to me is that without safety refusals the model did a lot of interesting counter-security work in order to cheat on the requested evaluation. Like, it demonstrated interesting exploit achievements because it didn’t “feel like” doing the exercise, which is unsettling because presumably it could do the same thing with any work I tried to delegate to it, and might in fact be pre-disposed to doing that.

  5. llama052

    It’s a little concerning to me that it appears that openAIs sandbox consists of a web proxy and not stronger controls that would actually isolate traffic and report patterns to whoever is responsible for overseeing these research models. It should border on closer to an air gap network more so than a proxy.

    I would argue that it's negligence and that's aside from the fact that if a human did this there would actually be repercussions.

  6. ghm2199

    What is truly more scary is the fact that typically powerful models are trained on a constitution(Anthropic)/Model Spec(OpenAI) when doing there RL/RLHF. That gives it its persona of a "helpful assistant". Its the mask. Weak as it is its all that stands between the model refusing vs doing your bidding — or worst its own bidding when set about on making a widget X.

    Its also well known in academic research, that if you try to finetune the model to be more pliant for one end e.g. "Be helpful with analyzing cyber security threats", affects an unrelated part of its personality to do with safety e.g. talking to humans about mental health. Look at these excerpts that demonstrate such things from the blog:

    > We believe the entire intrusion was, from the agent's point of view, an attempt to cheat the evaluation: reach our production systems and steal the test solutions rather than solve the challenge on its own.

    > The models we reached for first, Claude Opus and Fable, refused a large part of that work: their safety guardrails treated reverse-engineering an exploit the same as launching one.

  7. cmiles8

    It’s an interesting post mortem and situation but it seems to say more about the weakness of the Hugging Face architecture than it does about the strength of the models.

    This mostly reads like script kiddie style hacking, not some state actor black-ops stuff.

  8. firasd

    Bottom line seems to be: So Huggingface has a feature where you can upload a dataset. The agent used that feature to insert an arbitrary payload into their environment. Now their environment also supports templates inside the dataset and the template ended up being evaluated into executable code

More from this day

2026-07-29