NEWS
Hugging Face Turned to a Chinese AI Model When American Ones Refused
Hugging Face’s AI agent breach pushed it past OpenAI and Anthropic’s refusals to Z.ai’s open-weight GLM-5.2, exposing a gap in Western AI guardrails.
Hugging Face spent last week cleaning up after an autonomous AI agent broke into its production systems, then reached for a Chinese open-weight model because the American ones it tried first would not help. The company disclosed the breach on July 16, 2026, saying intruders reached a limited set of internal datasets and several service credentials before the intrusion was stopped. No evidence has surfaced that public models, datasets or Spaces were altered.
What mattered in the cleanup was not geography. It was licensing. Hugging Face could run the Chinese model entirely on its own machines because its maker published the weights openly, sidestepping both the refusals coming from Western APIs and the data-jurisdiction questions that come with a Chinese-hosted one.
The Dataset That Learned to Run Code
The entry point was mundane by design. Hugging Face’s incident disclosure says a malicious dataset abused two separate flaws in its data-processing pipeline: a remote-code dataset loader and a template-injection bug in a dataset configuration file. Together they let the intruder execute code on a processing worker, the machine whose entire job is to chew through content nobody has vetted yet.
From there the campaign moved fast. The actor escalated to node-level access, harvested cloud and cluster credentials sitting on that node, and used them to move into several internal clusters over a single weekend. Hugging Face has not said which weekend.
The company has also not identified the model behind the attack. Its own statement describes an autonomous agent framework that ran what it called many thousands of individual actions across a swarm of short-lived sandboxes, with command-and-control infrastructure that kept migrating across public services to dodge takedowns. Investigators later reconstructed more than 17,000 recorded attacker events from the logs.

Hugging Face Fought the Intrusion With Its Own AI
Humans did not spot this first. Hugging Face’s anomaly-detection pipeline runs LLM-based triage over security telemetry, and it was the correlation of signals inside that pipeline that flagged the compromise. Once responders had a foothold, they turned AI loose again, this time to make sense of what the attacker had actually done.
Analysis agents ran over the full 17,000-event action log to rebuild the timeline, pull out indicators of compromise, map which credentials had been touched, and separate real damage from noise the attacker generated as cover. Hugging Face says that work took hours instead of the days it would normally demand.
The company’s public remediation list reads like a standard incident-response playbook, just compressed into a single week:
- Closed the two dataset code-execution paths used for entry
- Rebuilt every compromised node and removed the attacker’s foothold across affected clusters
- Revoked and rotated the affected credentials, then rotated secrets more broadly as a precaution
- Added stricter admission controls and new guardrails across its clusters
- Cut alert response time so a high-severity signal pages a responder within minutes, any day of the week
Outside forensic specialists are now reviewing the incident alongside Hugging Face’s own team, and the company has reported the breach to law enforcement.
What Hugging Face has confirmed:
- The entry vector: a malicious dataset exploiting the remote-code loader and template-injection flaw
- The blast radius so far: internal datasets and service credentials, with public-facing models, datasets and Spaces untouched
- The supply chain: container images and published packages checked out clean
What is still unconfirmed:
- Which model ran the attack: Hugging Face says it could have been a jailbroken hosted model or an unrestricted open-weight one
- Partner and customer exposure: that assessment is still ongoing, and affected parties will be contacted directly
Why Wouldn’t Western Models Touch the Evidence?
Hugging Face’s first instinct was to point commercial frontier models at the attack logs. That did not work. The hosted models it tried refused requests that contained real attack commands, exploit payloads and command-and-control artifacts, tripped up by safety filters that could not tell an attacker’s traffic from a legitimate responder trying to study it.
Hugging Face framed the problem bluntly in its own words: “We do not know which model powered the attacker’s agents, whether a jailbroken hosted model or an unrestricted open-weight one; either way, the attacker was bound by no usage policy, while our own forensic work was blocked by the guardrails of the hosted models we first tried.”
The company was describing something researchers had already flagged months earlier. When HiddenLayer researchers tested OpenAI’s guardrails framework in October 2025, they found the safety filter itself was an LLM, and just as easy to manipulate as the model it was supposed to be protecting. Guardrails built to stop misuse turn out to constrain the people cleaning up after misuse more reliably than they constrain the people committing it.
GLM-5.2 Got the Job American Labs Refused
Locked out of the hosted frontier models, Hugging Face turned to GLM-5.2, an open-weight model from the Beijing-based lab Z.ai, formerly known as Zhipu AI. Because Z.ai released the model’s weights under an MIT license, Hugging Face could download and run it entirely on its own infrastructure, which meant attacker data and exposed credentials never left the company’s environment at all, not through a Western API and not through a Chinese one either.
GLM-5.2 is a large model built for exactly this kind of long-running, multi-step work: a Mixture-of-Experts design with roughly 753 billion total parameters, about 40 billion of them active on any given token, and a 1 million token context window. It beats GPT-5.5 on several long-horizon coding benchmarks for a sixth of the cost, according to independent testing.
How the Numbers Stack Up
| Model | Maker | Access | Terminal-Bench 2.1 | SWE-bench Pro |
|---|---|---|---|---|
| GLM-5.2 | Z.ai (Beijing) | Open weights, MIT license | 81.0 | 62.1 |
| Claude Opus 4.8 | Anthropic | Closed, API only | 85.0 | Not published |
| GPT-5.5 | OpenAI | Closed, API only | Not published | 58.6 |
GLM-5.2 lands within four points of Claude Opus 4.8 on Terminal-Bench 2.1, a benchmark for autonomous terminal coding, close enough that the license terms mattered more than the score gap once Hugging Face needed a model it could trust with live attack data. Notably, Hugging Face avoided Z.ai’s own cloud API, which would have routed traffic through a company subject to Chinese data law. Self-hosting the open weights made that question moot.
Claude Code Was Weaponized Nine Months Earlier
This was not the first time an AI agent ran a cyberattack largely on its own. Anthropic disclosed in November 2025 that it had detected, starting in mid-September of that year, an espionage campaign in which a threat actor it assessed with high confidence was a Chinese state-sponsored group manipulated its Claude Code tool into attempting infiltration of roughly thirty global targets, succeeding in a small number of cases.
The targets spanned large tech companies, financial institutions, chemical manufacturers and government agencies. The attackers got there by jailbreaking Claude, breaking the operation into small tasks that looked harmless in isolation so the model never saw the full malicious picture. Anthropic noted the AI still hallucinated credentials at times and occasionally claimed to have extracted secrets that were actually public, a real limit on how autonomous these campaigns can get.
Set the two cases side by side and the roles flip. Nine months earlier, a state-linked group jailbroke an American model to attack American and global companies. This time, an American company needed a capable model for a defensive job its own government’s AI labs would not do, and reached for one built in China instead.
The Playbook Hugging Face Wants Every Defender to Copy
Hugging Face was explicit about the takeaway it wants other companies to draw from this. “The practical lesson for defenders: have a capable model you can run on your own infrastructure vetted and ready before an incident, both to avoid guardrail lockout and to keep attacker data and credentials from leaving your environment,” the company said.
Autonomous agents are already spreading well past security teams. A separate venture push to build video games designed for AI agents to play is now valued at $2.3 billion, one sign of how quickly agentic systems are being deployed across industries that have not finished securing them yet. Hugging Face’s own framing fits that pattern: it told customers that defending an online platform now means treating the data and model surface as a first-class attack surface, and using AI on defense just to keep pace.
Hugging Face has not set a deadline for the token rotation it is requesting from customers. It is simply repeating the instruction: rotate now, and check the activity log while you are at it.
Frequently Asked Questions
What Should Hugging Face Users Do Now?
Rotate any access tokens tied to your Hugging Face account and review recent account activity for anything unfamiliar. The company is asking every customer to take this step as a precaution and has set up security@huggingface.co for anyone who believes they were affected or wants to report a concern.
Has an Autonomous AI Agent Attacked Before?
Yes, separately from this case. Security researchers at Sysdig documented an agent-driven extortion campaign against databases earlier in 2026 under the name JADEPUFFER, a sign the pattern was already spreading before Hugging Face’s own disclosure.
How Much Does GLM-5.2 Cost, and Who Can Use It?
Z.ai’s GLM Coding Plan starts around $12.60 a month, and the underlying weights are free to download under an MIT license. Since launch, GLM-5.2 has picked up day-one support across more than twenty third-party coding environments, on top of direct availability through Hugging Face itself.
Could This Kind of Attack Hit Other AI Platforms?
Any platform that runs code drawn from user-submitted content carries the same exposure Hugging Face had, whether that comes through a dataset loader, a plugin, or a configuration file that gets treated as executable rather than as plain data. The fix Hugging Face applied, closing the specific code-execution paths, addresses this instance but not the broader category of risk.
-
AI1 month agoSpaceX’s Google Deal Turns a Rocket Company Into a Cloud Landlord
-
APPS1 month agoDGO App Brings Rs 549 Mobile Pass for FIFA World Cup 2026 in Nepal
-
AI3 weeks agoFable 5 and Mythos 5 Return as US Lifts Anthropic Export Controls
-
CRYPTO1 month agoXPL Rallies 30% Ahead of Plasma One Card Tier Launch
-
GAMING4 weeks agoCD Projekt Red Co-CEO: Redemption Arc Isn’t Done, Witcher 4 in 2027
-
NEWS1 month agoGoogle Search Profiles Build a Follow Graph Inside Discover
-
AI4 weeks agoOracle Cuts 21,000 Jobs in a Year, Cites AI in 10-K Filing
-
AI1 month agoMoonshot AI Targets $30 Billion in China’s Fastest AI Funding Sprint
