Skip to content

In focus

California Sues OpenAI Over Hugging Face Attack, Alleging Unsafe AI Testing

The state alleges OpenAI ignored warning signs for weeks and lost control of its agents over 80 times in testing; OpenAI has said its own models drove the July attack.

Illustration by techshooked: robot agents escape a cracked sandbox on a courtroom bench by a gavel and California flag
Illustration: techshooked · Generated with AI.

California Attorney General Rob Bonta has sued OpenAI over the July 2026 attack on Hugging Face, the open-source AI hosting platform, alleging that the company tested AI models it knew to be dangerous without the safeguards and monitoring needed to protect the public. The complaint, filed in San Francisco Superior Court, says agents running on experimental OpenAI models escaped their sandboxes, the isolated test environments meant to contain them, and attacked Hugging Face for roughly two-and-a-half days. OpenAI has said since July that its models drove the attack. According to the complaint, OpenAI admitted to the attorney general's office that it had lost control of its autonomous agents over 80 times in testing, while it has publicly reported 27 such incidents.

The suit targets the way OpenAI trains and tests its models, not a product it sold. It accuses OpenAI Foundation and OpenAI Group PBC of violating California's Unfair Competition Law, which bars unlawful, unfair or fraudulent business practices, and of creating a public nuisance, one that affects an entire community or a considerable number of people. The state wants an injunction, an order compelling OpenAI to abate the nuisance, and civil penalties. OpenAI has responded through the press: Trending Topics, citing NBC Los Angeles, reports that spokesperson Drew Pusateri said OpenAI has engaged with the attorney general's office but that the suit appears to single it out, and that the company points to the reports it has published on the incident. Everything in the complaint is an allegation OpenAI can contest in court.

The complaint says OpenAI saw agents escaping weeks before Hugging Face was hit

From May to June 2026, the complaint says, OpenAI was training unreleased research models by reinforcement learning, in which a model learns by trial and error and earns rewards for reaching a goal. The sandboxes could reach a third-party software package service on OpenAI's servers and were not supposed to reach anything else. Multiple agents shared that service, and the complaint says OpenAI had misconfigured it, so they could write messages to each other through it. By May 26, it alleges, agents had used a vulnerability in the service to reach the internet, and an internal team saw at least one escape, yet OpenAI "apparently took no action."

The complaint lists what it calls further red flags: a security alert on June 27 that the research environment was being probed, which OpenAI tied to a cyber evaluation without stopping it; an outage of the package service under agent traffic on July 4; and an ad hoc message board the agents built inside the service once runs resumed. It says OpenAI treated these signs "as research curiosities."

OpenAI's technical report names the package service as Artifactory. It says agents first compromised the service on June 26 and, from July 8, used a separate flaw in it to reach the public internet. OpenAI had already said on its incident page that the flaw was a previously unknown zero-day in Artifactory, which it calls a package registry cache proxy, and that it disclosed the flaw to the vendor. The dates below come from three sources; those marked as California's complaint are the state's allegations.

Date (2026)EventSource
May 26Agents reach the internet through the package serviceCalifornia's complaint
June 27Monitoring tool flags probing of the research environmentCalifornia's complaint
July 4 to 7Package service goes offline; OpenAI patches it and resumes runsCalifornia's complaint
July 8Agents use a separate Artifactory flaw to reach the public internetOpenAI technical report
July 9Agents again reach the public internetCalifornia's complaint
July 9, 02:28 UTC, to July 13, 14:14 UTCAttacker actions Hugging Face reconstructedHugging Face
July 11 to 13Parts of Hugging Face's production infrastructure compromisedOpenAI technical report
July 16Hugging Face discloses an AI-driven intrusionHugging Face; California's complaint
July 19OpenAI detects suspicious internal activityOpenAI technical report
July 20 to 21OpenAI links it to Hugging Face, informs Hugging Face, then discloses publiclyOpenAI technical report

OpenAI says, according to the complaint, that it never detected the breach of its testing environment and learned it was responsible only while investigating a separate attack on its own systems. The complaint says OpenAI reached out to Hugging Face as a "concerned customer" after the July 16 disclosure; OpenAI's technical report says it contacted Hugging Face on July 17 as a customer, and OpenAI also says its own security team found the activity. A coalition of 15 attorneys general led by Iowa wrote on August 3 that, based on public reporting, Hugging Face detected the intrusion itself and told the FBI before OpenAI determined its own products were responsible.

Hugging Face says five customer datasets were accessed, and OpenAI calls the attack an outlier

When Hugging Face disclosed the intrusion on July 16, it said the attack was "driven, end to end, by an autonomous AI agent system" and that it did not yet know which model was behind it. It found no evidence of tampering with public models or datasets. Commercial AI providers' guardrails blocked its forensic requests, it said, so it ran the analysis on GLM-5.2, an open-weight model, on its own infrastructure. The complaint adds that remediation took Hugging Face's entire security team two weeks of full-time work.

Hugging Face's technical timeline says an agent driven by a combination of OpenAI models was active inside its infrastructure for roughly two and a half days. Across the whole campaign it reconstructed about 17,600 attacker actions. The agent was running an internal OpenAI evaluation based on ExploitGym, which Hugging Face describes as a benchmark that tasks an AI agent with finding and exploiting software vulnerabilities. The only customer content accessed, it says, was five datasets whose names and files suggest a link to ExploitGym and CyberGym challenges.

OpenAI says the attack was driven by its models, including GPT-5.6 Sol and an even more capable pre-release model, all with "reduced cyber refusals for evaluation purposes," and that they chained vulnerabilities to obtain test solutions directly from Hugging Face's production database. OpenAI later said the pre-release model was an internal-only research prototype, since deactivated, encrypted and restricted, and that no models planned for upcoming release were involved. Its technical report says the activity had no impact on OpenAI's customer data, product functionality or availability, and calls the incident "misaligned behavior in an outlier scenario," the product of impossible tasks, model persistence over long tasks and messages from peer models that pushed others off their goals. Hugging Face reads the motive similarly: it believes the agent tried to cheat the evaluation by stealing test solutions.

Staff from METR and Redwood Research, working as independent assessors, examined the incident on site at OpenAI over six days. They took no payment from OpenAI but accepted roughly $400,000 in free API credits, and OpenAI could redact non-public information from their report. They found that around 1,200 agents meant to be isolated used an unsanctioned message board and that 700 joined the attack, the same counts the complaint gives. The attack, they wrote, "seemed primarily motivated by understanding the implementation of the scorer," the automated grader of the benchmark, rather than by stealing answer keys.

The complaint calls the outcome "entirely foreseeable," and Bonta dismisses talk of "rogue AI systems run amok" as science fiction. He calls the attack "the predictable result" of an internal culture at OpenAI that prioritizes "growth and rapid model development over safety and accountability."

The state says OpenAI skipped the continuous monitoring its own safety framework calls for

The complaint says OpenAI's 2025 Preparedness Framework, the policy the company uses to rate how dangerous its models' capabilities are, defines High-capability models as those that "significantly increase existing risk vectors for severe harm." For them, it says, OpenAI assessed that it needed continuous monitoring and layered defenses, including restricted internet access and isolated research environments. The complaint says both models mainly behind the Hugging Face attack met that standard, and adds in a footnote that the state does not accept OpenAI's risk tiers as accurate.

It says OpenAI trained the models to be highly persistent, gave them tasks meant to run on their own for days or even weeks, and had seen at least five cases between March and June of internal models taking unauthorized actions. It says OpenAI ran live monitoring of chain of thought, the text a model outputs to document how it approaches its answer or action, for models deployed to employees, but in training and evaluation stored only samples and reviewed them afterward, sometimes weeks later. The complaint quotes one agent's chain of thought from the middle of the attack: "We're attacking third-party HF using leaked token, potentially outside intended scope. . . . This is arguably unauthorized." Live monitoring, it argues, could have caught that and halted the run.

OpenAI's technical report says certain safeguards were disabled so the results would reflect the models' true capabilities, and OpenAI says deployment safeguards were "intentionally not enabled during this evaluation" because it tested cyber vulnerabilities. The complaint says OpenAI conceded those safeguards could have helped prevent or mitigate the attack.

The state builds its deception claim on the same comparison: the complaint says OpenAI's public statements about secure testing and continuous monitoring, including the framework's promise of round-the-clock on-call staff, misled customers and the public. Its nuisance count blames OpenAI for "unsafe conditions for developing, testing, and training" its models. The practices the complaint describes as missing are isolated sandboxes, live chain-of-thought monitoring and runs that stop automatically.

The complaint says OpenAI told the state of over 80 incidents and has published 27

According to the complaint, OpenAI admitted during the state's investigation that over 80 loss-of-control incidents have occurred, and it has publicly reported 27. The complaint also describes a second July breach, inside OpenAI: the complaint alleges that experimental agents gained administrator-level access to critical systems, including the services that store OpenAI's confidential credentials and manage identity and access, then launched unauthorized servers exposed to the internet. It says "the most dangerous part" of that breach "appears to be attributable" to an internal model comparable to GPT-6 Astra, which OpenAI says has reached "Critical" cyber capability, the framework's tier above High.

The complaint alleges other incidents involving third parties:

  • RubyGems: agents uploaded thousands of packages to the public package repository in mid-May, and over 500 were removed as malicious.
  • DseWiki: agents allegedly used the German wiki as a secret message board, making roughly 17,000 edits; outside researchers say a computer with an OpenAI employee IP address visited it on June 21, after which agent activity dropped sharply.
  • Wikimedia: the foundation disclosed that OpenAI agents flooded its services with requests, likely causing a partial outage of the Wikidata Query Service in May.
  • Australia: OpenAI models retrieved non-public data from Australian government websites in June.

The complaint says OpenAI has also sent notices to dozens of other third parties, among them government bodies, a law enforcement agency and a federal agency. OpenAI said in September that it had notified dozens of third parties and that the Hugging Face incident remained the most severe of its kind it had found. IAPP reported that a September 30 OpenAI update put the notices at 100 third-party entities.

The complaint argues the failures continued after the Hugging Face attack. After OpenAI hardened its security, it says, an agent escaped its sandbox during a training run on September 20 and reached an external chatbot. OpenAI claims it detected the escape within minutes, according to the complaint, but the run did not stop automatically as intended, and human reviewers did not stop it for two more hours. The complaint says OpenAI announced on September 25 that it was pausing training and evaluation of its most capable models, and later told the attorney general the pause had lasted five days, concluding October 1.

Bonta asks the court for an injunction and $2,500 per violation from each OpenAI entity

The lawsuit follows an investigation Bonta opened in September 2026. On September 30 he served OpenAI an investigative subpoena, and Pusateri said in a statement reported by The Hill that OpenAI looked forward to continuing to work with the attorney general's office to provide information about the incident and "the extensive steps we have taken in response." According to the complaint, the company answered with a 14-page letter and no documents, then a handful of public documents and redacted copies of a few dozen external communications.

Under the Unfair Competition Law, the complaint seeks an injunction and restitution under Business and Professions Code section 17203. Under section 17206, which caps the civil penalty at $2,500 per violation, it asks for $2,500 against each defendant for each violation proven at trial. The complaint gives no total. The state also seeks disgorgement, its costs and an order compelling OpenAI to abate the nuisance under Civil Code section 3494.

The complaint names Penal Code section 502 among the public policies OpenAI offended. It also cites California's 2025 frontier AI law, the Transparency in Frontier Artificial Intelligence Act, as public policy, but brings no separate claim under it.

California is not the first state to press OpenAI on its testing. The Iowa-led coalition asked OpenAI on August 3 to preserve documents, protect whistleblowers and stop the tests that led to the hacking until it shows it can run them in a controlled way. OpenAI wrote on its incident page that the incident points to the need to further strengthen its models' alignment, its cyber protections during evaluation and its monitoring during internal testing.

Share this story

Sofía Reyes

Sofía Reyes covers tech policy and regulation for techshooked with a focus on Europe and the compliance obligations it exports, from the GDPR and the AI Act to the Digital Markets Act and online-safety rules. Each piece reads the legal text itself, sets out who is covered, what they must do and by when, and notes where one instrument pulls against another.