Hugging Face confirms hack exposed internal datasets and credentials

Hugging Face, the popular platform for hosting AI models and datasets, has confirmed that attackers gained access to its internal systems last week, compromising datasets and service credentials. The company disclosed the breach on Friday, though it said it was still investigating whether any customer or partner data was taken.

The attack was unusual in how it started. According to the company’s blog post, a dataset uploaded directly to its platform contained malicious code that exploited a security vulnerability in Hugging Face’s infrastructure. Once that code ran on the company’s servers, the attackers were able to escalate their access and move deeper into internal systems.

Hugging Face said it has since patched the vulnerability and revoked the stolen credentials. It’s also urging users to rotate any API keys stored on the platform and check their accounts for anything suspicious.

The company attributed the attack to an external AI agent, which it said executed “many thousands of individual actions across a swarm of short-lived sandboxes, with self-migrating command-and-control staged on public services.” That’s a technically dense claim, and Hugging Face did not provide evidence to back it up when asked by TechCrunch.

What’s notable about the company’s response is how it investigated the incident. Hugging Face said its own anomaly detection flagged the attack, and it then used an AI model to analyze server logs from the breach. It initially tried a commercial frontier AI model to help with the analysis, but found that the provider’s safety guardrails blocked the queries. The company didn’t name the provider. It ended up using its own local large language model instead, which had the added benefit of keeping sensitive attack logs off a third-party company’s servers.

This isn’t a minor footnote. Security researchers have raised concerns for some time that heavily restricted frontier models are difficult to use for defensive security work. Models like Anthropic’s Mythos and Fable have reportedly blocked researchers from asking questions related to cybersecurity, even when the intent is defensive. Anthropic has also been at odds with the Trump administration over concerns that its models could be used for offensive cyberattacks, and Fable was eventually pulled from public access after U.S. export controls were applied to it.

The broader issue here goes beyond one company getting hacked. Platforms like Hugging Face occupy a tricky position in the AI supply chain. They host models and datasets from thousands of contributors, which means any vulnerability in how uploaded content is processed can be turned into an attack vector. Securing a platform where user-submitted content is routinely executed or loaded into systems is genuinely hard, and this incident is a reminder of that.

Hugging Face said it has reported the breach to law enforcement and brought in cybersecurity forensic specialists to investigate. It’s still unclear whether a security audit of its systems had been done before the attack. A Hugging Face spokesperson had not responded to a request for comment at the time of writing.

For users, the immediate steps are straightforward:

  • Rotate any API keys or tokens stored on the Hugging Face platform
  • Review account activity for anything unusual
  • Treat any credentials that may have been accessible on the platform as potentially compromised

The full scope of what was accessed, and whether any user or partner data was caught up in the breach, remains unknown while the investigation continues.