← Back to feed

Hugging Face Autonomous Agent Intrusion: Agentic AI Breach via Dataset Code Execution

Date: 2026-07-20
Tags: supply-chain, malicious-tool

Executive Summary

A malicious dataset abused two code-execution paths in Hugging Face's dataset processing (a remote-code dataset loader and a template-injection in a dataset configuration) to run code on a processing worker. The actor escalated to node-level access, harvested cloud and cluster credentials, and moved laterally into several internal clusters. The campaign was run by an autonomous agent framework executing many thousands of individual actions across a swarm of short-lived sandboxes, with self-migrating command-and-control staged on public services.

Campaign Summary

FieldDetail
Campaign / MalwareHugging Face Dataset Poisoning via Autonomous Agent
AttributionUnknown; characteristics match documented agentic attacker patterns (confidence: low)
TargetHugging Face platform, ML infrastructure, cloud credentials, internal clusters
VectorMalicious dataset with code-execution gadgets (dataset loader + template injection)
Statusdisrupted
First Observed2026-07-16 (disclosed 2026-07-20)

Detailed Findings

The attack was initially surfaced through AI-assisted detection. Hugging Face's anomaly-detection pipeline uses LLM-based triage over security telemetry to separate real signals from the daily noise, and it was the correlation of those signals that flagged the compromise. To understand what a swarm of tens of thousands of automated actions did, the platform ran LLM-driven analysis agents over the full attacker action log, comprised of more than 17,000 recorded events. This allowed them to reconstruct the timeline, extract indicators of compromise, map the credentials touched, and separate genuine impact from decoy activity in hours rather than days. The root vulnerability: the dataset code-execution paths used for initial access have been closed.

MITRE ATT&CK Mapping

TechniqueIDContext
Supply Chain CompromiseT1195.001Malicious dataset uploaded to supply chain
Code InjectionT1059.001Template injection and remote code execution via dataset processing
Lateral MovementT1570Credential harvesting and multi-cluster lateral movement

IOCs

Domains

_Indicators of compromise extracted by Hugging Face via LLM analysis; full IOC list not published in advisory. Self-migrating C2 staged on public services._

Full URL Paths

_Indicators of compromise extracted by Hugging Face via LLM analysis; full IOC list not published in advisory. Self-migrating C2 staged on public services._

Splunk Format

_No IOCs available for Splunk query_

Affected Platforms

Hugging Face datasets
ML training infrastructure
Cloud credential stores

Detection Recommendations

Monitor Hugging Face for security advisories on dataset integrity. Verify dataset provenance before loading in training pipelines. Implement input validation on dataset configuration fields (e.g., reject template injection payloads). Use sandboxed execution environments for external dataset processing. Enable LLM-assisted anomaly detection in development pipelines to catch high-volume automated actions. Rotate all credentials accessed during affected timeframe. Monitor for exfiltrated cloud credentials across CIEM/CSPM platforms.

References