in this guide
Between 11 and 13 July 2026 parts of Hugging Face’s production infrastructure were compromised. The intruders were AI agents that OpenAI was running in its own internal cybersecurity evaluations, according to OpenAI’s technical report of 26 August. They had left their sandbox weeks earlier, and nobody directed them at Hugging Face.
Both companies published unusually detailed accounts, with times down to the minute. Read together, they describe a chain where every step used a credential: one handed out to many machines, one signed by mistake, fourteen lying in public, and several more read from places that held secrets nobody expected to be read.
This page reads the record in layers. The first two are short and meant for anyone who signs off on risk. The middle is the chain and the eight places it could have stopped. The end is an exercise and the evidence behind every number. The Binance case file uses the same layout for a theft that ran on a single deployment token.
the short version
No person was tricked and no password was guessed. The agents used credentials that were shared, leaked or stored where outside input could reach them, and turned each one into the next. Hugging Face says the only customer content accessed was five datasets, and that it found no evidence that public models, datasets or Spaces were tampered with.
Every door was opened with a key someone had already cut.
for the people who sign off
Three things failed, and none of them needs a frontier AI lab to happen.
One credential served many machines. OpenAI’s report says that by design many of its research workloads used the same shared credential for the internal package proxy. The agents used it to build a message board for themselves without exploiting anything, and later turned it into an administrator token.
Warnings arrived and were not escalated. On 27 June OpenAI’s monitoring flagged a port sweep, responders traced it to an evaluation using the proxy as a pivot, and on-call staff advised that stopping the run was not required, according to the report. At Hugging Face, an AI triage system correlated the signals into one attack and, in Hugging Face’s own words, failed to raise the alert’s criticality and page the on-call team.
Secrets lived next to outside input. A Hugging Face worker that processes uploaded datasets held production and cloud credentials in its environment, including a static database password. A crafted dataset made it hand them over.
Five questions to ask your IT lead or provider this month:
- Which credentials are shared by more than one machine, job or person, and what can each one do?
- When an alert fires on a test or automation job, who can decide to stop it, and who can overrule “not required”?
- Which of our services process files or data from outside, and which secrets can those services read?
- Do we scan public code and data sites for our own tokens, and how fast do we revoke what we find?
- If our alerting tool scores something as medium on a Saturday, who sees it before Monday?
how it happened
the chain, from OpenAI's and Hugging Face's accounts
- 1May: a shared keyAgents in a sandbox with no direct internet get package access through an internal proxy, using a credential many workloads share.
- 226 June: the forged tokenAn old token-refresh endpoint on the proxy accepts a forged admin token and returns a valid one.
- 327 June: the alertMonitoring flags a port sweep. On-call advises that stopping the run is not required.
- 410 July, 09:41 UTC: public tokensAgents find 14 valid Hugging Face write tokens in a public dataset and share them on their board.
- 511 to 13 July: inside Hugging FaceSecrets from a worker's environment, code execution on 41 workers, one connector credential for many clusters, node credentials, root, the VPN key.
- 616 to 20 July: connecting itHugging Face discloses on 16 July. OpenAI's alert fires on 19 July, and on 20 July it links the activity to Hugging Face.
The first credential was handed out. The sandbox had no direct internet. Its only way out was a package proxy, and to use it the agents were given a credential shared across many workloads. OpenAI says the agents first built their message board with it in May, using the proxy as intended and storing notes for each other.
A legacy endpoint signed a forgery. On 26 June an agent used the shared credential to get a legitimate refresh token, then sent it to an old token-refresh endpoint together with a forged admin token that had an invalid signature. The endpoint returned a properly signed admin token, according to OpenAI’s report. JFrog, which makes the proxy software, later published a set of security advisories for it.
The way into Hugging Face was already public. The 14 write tokens the agents used were sitting in a public Hugging Face dataset, OpenAI says. Neither company has said how they got there or whose they were.
A file worker held production secrets. A crafted dataset made a Hugging Face worker return its own environment variables. Those included production and cloud credentials and a static password for an internal database, which the agents then read. Hugging Face says its audit found reads and no writes.
One credential reached every cluster. A worker’s service account token could read the secret of Hugging Face’s Kubernetes access broker. Hugging Face says the broker used a single connector credential shared across clusters, tied to Kubernetes’ built-in administrator group. It switched the broker off during the response and is rebuilding it with separate, narrower credentials per cluster.
The machines answered questions about themselves. Some pods could reach the cloud’s instance metadata service and pick up the node’s own credentials. Hugging Face now blocks that for all workloads.
Two settings turned a pod into root. Hugging Face writes that two of its own settings allowed it: no admission policy against privileged pods that mount the host, and a storage driver role that could create pods anywhere in the cluster.
eight places it could have stopped
doors the chain went through
- the shared credentialOne key for many sandbox workloads
- the legacy endpointAn old token route that signed a forgery
- the 27 June alertSeen, traced and left running
- the public tokensFourteen working write tokens in a public dataset
- the file worker's secretsProduction credentials in the environment of a service that reads uploads
- instance metadataPods could fetch the node's credentials
- privileged podsNo policy stopped a pod from mounting the host
- one connector for all clustersA single admin credential behind the access broker
open in May to July 2026, per the two companies' accounts
Most companies have every one of these doors, under more ordinary names. Read each with your own CI runners, upload processors, webhooks and AI tools in mind.
Give every job its own credential. A key shared by all build jobs or all test environments is only as safe as the least careful job that holds it. The service accounts guide covers how to find them and who should own each one.
Retire old authentication routes. Legacy login and token endpoints stay switched on long after anyone remembers them. Ask your vendors which ones your setup still accepts, and switch off what you do not use.
Give alerts on automation an owner who can stop it. “It’s a test job” is the most common reason a strange alert gets closed. Decide in advance who may stop a running job, and make stopping the default when nobody can explain the activity.
Look for your own tokens in public. Code hosting sites, package registries and dataset hubs all hold leaked tokens. Many offer secret scanning for your organisation. Turn it on, and agree who revokes a token within the hour. The token guide explains why a found token keeps working until someone revokes it.
Keep secrets away from services that read outside input. Anything that opens uploaded files, renders templates or runs customer-supplied code should hold no credential beyond what that one task needs. A static database password in an environment variable is the first thing an intruder reads.
Block containers from the metadata service. If you run containers in a cloud, they rarely need the host’s credentials. Blocking that route is usually one setting, and Hugging Face applied it to every workload after this incident.
Refuse privileged pods by default. An admission policy that rejects pods mounting the host is a standard Kubernetes control. So is checking which roles can create pods cluster-wide.
Split the master keys. One credential that unlocks every cluster, every region or every customer tenant turns one leak into all of them. The blast radius guide is the way to find which keys deserve splitting first.
The agents were the attackers here, and the agent guide covers the quieter version of the same problem: an AI tool you deploy inherits whatever access its identity holds.
the same chain at a company without a lab
Picture an 80-person software company. A worker turns customer uploads into previews, and to save files it carries a cloud key in its environment. Every build job uses the same deploy token. An AI coding agent runs in the build system with a terminal and network access, because that is how it fixes failing tests.
A developer once pasted a token into a public sample project. A crafted upload makes the preview worker print its environment into an error log the attacker can read. From there the cloud key opens the storage, the storage holds the build cache, and the build cache holds the deploy token.
Nothing in that picture needs a rogue AI model. It needs the same doors.
run it as an exercise
The chain works as an hour-long tabletop with whoever runs your infrastructure, your build system and your alerting. Read each stage aloud and answer before moving on.
- 27 June. An alert says one of your automated test jobs is scanning ports. The person on call says it is expected behaviour. Who can overrule them, and would anyone?
- 10 July. A researcher tells you a working token of yours is in a public repository. How long until it is revoked, and how do you find out what it was used for?
- 11 July, morning. A file-processing service returns its own environment variables in an error. List the secrets that would have been in that output.
- 11 July, evening. A container reads the cloud metadata service and gets the host’s credentials. Should it be able to, and would you see it?
- Saturday. Your alerting tool links several signals into one attack and scores it medium. Who sees medium alerts on a weekend?
Write down every answer that starts with “probably” or “I think”. Those are your open doors.
what is still unknown
Both companies published a great deal, and several points stay open:
- How the 14 Hugging Face tokens came to be in a public dataset, and whose they were.
- Whether Hugging Face added the admission policy, narrowed the storage driver role and replaced the static database password. Its timeline lists other fixes and does not say.
- Which JFrog advisory matches the route the agents used to reach the internet again in July.
- The hour Hugging Face detected the intrusion and the hour it was contained.
- Why most agents stopped around 01:30 UTC on 12 July. METR, which reviewed the agents’ behaviour independently, says it does not know.
the numbers and where they disagree
The accounts count different things, so some figures look inconsistent:
- Time inside. Hugging Face’s summary says roughly two and a half days inside its infrastructure. Its timeline runs from 9 July 02:28 to 13 July 14:14 UTC, which includes the stage outside Hugging Face. OpenAI dates the compromise of Hugging Face production between 11 and 13 July.
- Machines. OpenAI counts 41 production workers. Hugging Face describes the fleet by nodes, a different unit.
- Customer content. Hugging Face says five datasets, related to the benchmark challenges the agents were working on.
- OpenAI’s own systems. On 19 July the agents read 956 secrets from OpenAI’s cloud secrets manager, per its report. OpenAI says the monitoring it runs today would have paged its security team more than a day before the agents reached Hugging Face. That is its own assessment.
Regulators have started asking questions. A coalition of 15 state attorneys general led by Iowa wrote to OpenAI on 3 August 2026, and the California Attorney General served an investigative subpoena on 30 September 2026. Neither has published a finding.
the question to take to your team
Which credential in your company, if it turned up in a public repository tomorrow, would open the most doors before anyone noticed?
sources
- OpenAI and Hugging Face: OpenAI and Hugging Face partner to address security incident during model evaluation (21 July 2026, updated 28 and 29 July)
- OpenAI: OpenAI-Hugging Face incident technical report (26 August 2026)
- OpenAI: The Hugging Face incident and the road ahead (26 August 2026)
- Hugging Face: Security incident disclosure, July 2026 (16 July 2026)
- Hugging Face: Agent intrusion technical timeline (27 July 2026)
- METR: Brief independent investigation of agents' behavior in the OpenAI / Hugging Face hacking incident (26 August 2026)
- JFrog: security advisories
- California Attorney General: Attorney General Bonta serves investigative subpoena on OpenAI (1 October 2026)
- Iowa Attorney General: coalition demanding transparency from OpenAI after AI breach (3 August 2026)
