Incident report

Hugging Face Spaces Secrets Unauthorized Access Forcing Platform-Wide Token Revocation

On May 31, 2024, Hugging Face publicly disclosed that its security team had detected unauthorized access to its Spaces hosting platform, specifically impacting a subset of user-configured Spaces secrets. Because developers routinely store OpenAI, Anthropic, database, and Hugging Face write tokens inside Spaces environment secrets to power hosted Gradio and Streamlit demos, unauthorized secret exposure threatened downstream account takeover and API billing abuse. Hugging Face immediately revoked potentially exposed Hugging Face tokens held in Spaces secrets, notified affected creators to rotate third-party keys, deprecated legacy org tokens, and accelerated migration to KMS-backed secret encryption and fine-grained access tokens.

Incident record

Reported
Severity
Critical
Vector
Data Exfiltration
Affected system type
Hosted ML App & Inference Demo Platforms
Reference URI
https://huggingface.co/blog/space-secrets-security-update

Inspect in Interactive Incidents Hub

Defensive lesson

Use fine-grained least-privilege tokens with spending caps in hosted ML demo apps and rotate third-party API secrets whenever upstream hosting platforms disclose access breaches.

Research citation

Referenced techniques