HabrJuly 19, 2026🇷🇺Translated from Russian

Hugging Face Breached by Autonomous AI Agent That Used Malicious Dataset to Execute Remote Code and Spread Across Clusters

Hugging Face, the world’s largest platform for AI models, has revealed a breach of its infrastructure that stands out because the entire attack—from initial compromise to lateral movement—was executed by an autonomous system of AI agents. The company also relied extensively on artificial intelligence to detect, investigate, and understand the intrusion.

According to Hugging Face, the attacker obtained unauthorized access to a limited set of internal datasets and several service credentials. No evidence of tampering was found in public models, datasets, or Spaces, and the supply chain—including container images and published packages—was verified as clean. The company has not yet completed its assessment of potential impact on partner and customer data and has promised to contact affected parties directly if issues are identified.

How the Attack Unfolded

The attacker simply uploaded a malicious dataset to the open platform. This dataset exploited two vulnerabilities in the standard processing pipeline: a loader that executes remote code and an injection flaw in the dataset configuration template. The compromise allowed arbitrary code execution on a worker node, effectively turning a trusted data artifact into executable code—an outcome the pipeline was never intended to permit.

From the compromised worker, the attacker escalated privileges to the node level, harvested cloud and cluster credentials, and spread across multiple internal clusters over the weekend. The timing was deliberate: reduced human monitoring provided more time before discovery.

The campaign was orchestrated by an autonomous agentic framework, apparently built on a tool originally created for legitimate security researchers. Instead of operating from a single console like a human attacker, the system launched thousands of short-lived, isolated sandboxes in parallel, each performing a discrete task before disappearing. Command-and-control infrastructure was hosted on public services and frequently relocated, leaving defenders with no stable address or session to target.

AI-Powered Defense and Analysis

Detection began not with human analysts but with an LLM triage system that flagged anomalies in security telemetry. Correlation of these signals revealed the compromise. To reconstruct the attack involving tens of thousands of automated actions, engineers fed the complete log—more than 17,000 recorded events—into AI agents. This process recovered the timeline, extracted indicators of compromise, mapped affected credentials, and distinguished real damage from decoy actions in hours rather than days.

Initial attempts to analyze the logs using leading Western commercial models failed because their safety filters blocked the real attack commands, exploit payloads, and C2 artifacts. The company ultimately succeeded by deploying the open-source GLM 5.2 model on its own infrastructure, ensuring that sensitive attack data and credentials never left the company perimeter.

Hugging Face’s key takeaway is that data and models must now be treated as first-class attack surfaces and that defenders must match AI attackers at machine speed. The company advises all users to rotate access tokens and review recent account activity as a precaution.