Hugging Face disclosed a security breach affecting its Spaces platform this week, with unauthorized access detected specifically around Spaces secrets. The company now suspects a subset of those secrets were compromised. It’s the kind of incident that sends a chill through anyone building on hosted AI infrastructure — secrets aren’t just passwords; they’re API keys, database credentials, and cloud provider tokens that can unlock far more than a single account.
As a first remediation step, Hugging Face revoked an unspecified number of HF tokens embedded in those exposed secrets. Affected users received email notices, which suggests the company has at least some visibility into which accounts were hit. The company is pushing users toward fine-grained access tokens, which are now the default and offer tighter scoping than the older read/write tokens it plans to deprecate entirely once feature parity arrives. That’s a meaningful shift — broad tokens have been a persistent weak point across the AI tooling ecosystem, not just Hugging Face.
Hugging Face has brought in outside cybersecurity forensic specialists and reported the incident to law enforcement and data protection authorities. That’s the right play legally, but it also signals the company doesn’t yet fully understand the scope of what happened. The internal changes — removing org tokens, implementing a key management service for Spaces secrets, and expanding systems that detect and proactively invalidate leaked tokens — read like a team scrambling to close gaps that should have been tighter already.
The bigger question is timing. Hugging Face has grown from a model-sharing hub into core infrastructure for thousands of AI products, and that growth has outpaced its security posture before. Last year, researchers flagged exposed API tokens on the platform, and the company has since added secret scanning. This breach suggests those efforts weren’t enough. For developers, the practical takeaway is blunt: rotate every credential that ever touched Spaces, assume any leaked secret is still dangerous, and stop using broad-scope tokens. Fine-grained access control isn’t just a feature — it’s the difference between a contained incident and a cascading one.