Hugging Face has disclosed a security breach in which an autonomous AI agent system compromised part of its production infrastructure and gained access to internal datasets and service credentials.
The company detected the intrusion earlier in July and published a detailed security incident disclosure on July 16. Hugging Face described the attack as being driven end to end by an autonomous agent framework rather than merely assisted by an AI chatbot or individual automated script.
The company is still investigating whether any partner or customer information was affected. However, Hugging Face says it has found no evidence that public models, user-facing datasets, Spaces, container images, or published software packages were altered.
Malicious Dataset Provided Initial Access
The intrusion began inside the platform’s data-processing pipeline, an attack surface that is particularly important for services that automatically inspect and process user-submitted AI datasets.
According to Hugging Face, a malicious dataset exploited two separate code-execution paths: a remote-code dataset loader and a template-injection vulnerability inside a dataset configuration.
These weaknesses allowed attacker-controlled code to execute on a processing worker. From there, the autonomous system escalated to node-level access, harvested cloud and cluster credentials, and moved laterally into several internal clusters over the course of a weekend.
The attacker reportedly used a swarm of short-lived sandboxes to perform thousands of individual actions. Command-and-control infrastructure was self-migrating and staged through public services, making the activity more resilient and difficult to follow.
Hugging Face said the framework resembled an agentic security-research harness, but the company has not identified which language model powered the operation. It could have involved a jailbroken commercial model, an unrestricted open-weight model, or another system.
More Than 17,000 Attacker Events Analyzed
Hugging Face recorded more than 17,000 events associated with the intrusion.
The company used AI-assisted detection to initially surface the compromise. Its security pipeline applies language models to telemetry to separate meaningful activity from routine background noise and correlate potentially related signals.
After detecting the intrusion, Hugging Face ran additional analysis agents across the complete attacker activity log. The system reconstructed the timeline, mapped exposed credentials, extracted indicators of compromise, and separated genuine activity from decoys.
Hugging Face said this reduced work that might normally require days to a matter of hours, allowing defenders to investigate at a speed closer to that of the autonomous attacker.
Hosted AI Guardrails Blocked Forensic Analysis
The company also encountered an unusual obstacle while investigating the breach.
Hugging Face initially attempted to process the attacker logs using frontier models accessed through commercial APIs. Those models blocked the requests because the logs contained real attack commands, exploit payloads, and command-and-control artifacts.
The safety systems could not reliably distinguish legitimate incident-response analysis from a user seeking assistance with offensive cyber activity.
Hugging Face instead performed the forensic analysis using GLM 5.2, an open-weight model operated on its own infrastructure. This allowed the company to examine the malicious content without triggering external safety restrictions and prevented attack data or credentials referenced in the logs from leaving its environment.
The company said the incident exposed an operational asymmetry. Attackers can use unrestricted or modified models without safety policies, while defenders relying only on hosted models may be blocked from examining the same malicious material during an emergency.
Compromised Nodes Rebuilt and Credentials Rotated
Hugging Face says it has closed both dataset code-execution paths used for initial access.
The company also removed the attacker’s foothold from affected clusters, rebuilt compromised nodes, revoked and rotated exposed credentials and tokens, and began a wider precautionary rotation of secrets.
Additional cluster guardrails and stricter admission controls have been deployed. Detection and alerting systems were also changed so that high-severity activity can page an incident responder within minutes regardless of the day or time.
Hugging Face is working with external forensic specialists and has reported the incident to law enforcement.
Users Advised to Rotate Access Tokens
Although there is no evidence that public-facing repositories or software packages were modified, Hugging Face is advising users to rotate their access tokens as a precaution.
Users should also review recent account activity for unfamiliar logins, repository changes, new access grants, or other suspicious behavior.
Organizations using Hugging Face tokens inside development pipelines should identify where those credentials are stored and replace them in CI/CD systems, cloud secrets managers, applications, notebooks, and local environment files.
The breach shows that autonomous offensive tooling is no longer limited to controlled demonstrations. An agent can now repeatedly probe infrastructure, adapt its actions, collect credentials, move between systems, and maintain command-and-control activity at machine speed.
For AI platforms, datasets and model-processing pipelines must be treated as untrusted code surfaces. Files uploaded for automatic processing require isolation, strict sandboxing, minimal worker permissions, short-lived credentials, and controls that prevent a compromised processing node from reaching broader production infrastructure.