rotateit

All incidents

Unauthorized access to Hugging Face Spaces secrets

Disclosed May 31, 2024 · updated Oct 28, 2026 · high · Historical

Hugging Face Spaces secrets may have been accessed by an attacker.

Are you affected?

The free scanner that answers this opens soon. Until then, the steps below work by hand.

What happened

Hugging Face Spaces secrets may have been accessed. On 2024-05-31 Hugging Face said it had detected unauthorized access to its Spaces platform earlier that week and suspected that a subset of Spaces' secrets could have been accessed without authorization. It revoked a number of Hugging Face tokens present in those secrets and emailed the affected users, engaged outside forensic specialists, and reported the incident to law enforcement and data protection authorities. It recommended that users refresh any key or token and switch to fine-grained access tokens, which it made the default.

Exposure starts
Not known yet (Hugging Face has not said when the access began)
Exposure ends
Not known yet (Hugging Face has not said when it ended)
Confidence
low
Scope
every key and token stored as a Spaces secret, including Hugging Face tokens and third-party API keys

What to do, in this order

  1. Hugging Face tokens stored in Spaces secrets; replace them with fine-grained tokens

    Hugging Face revoked some of these tokens and recommends moving to fine-grained tokens.

    anything else stored there

  2. Every other key or token stored as a Spaces secret

    Hugging Face recommends refreshing any key or token; it does not say which secrets in the subset were read.

    anything else stored there

Notes

  • Hugging Face planned to deprecate classic read and write tokens once fine-grained tokens reach feature parity.

Sources

Rotating the keys

Pro, $49 a year when it opens, plans the rotation of each affected key for this incident, in this order. Automatic rotation is in testing and included.

One email when it opens. Stored: your email, whether you confirmed, and when you signed up. We send a confirmation link first.

By hand, free: the steps above.