﻿# The 2024 Hugging Face Spaces disclosure: secrets, token scope and evidence

What the Spaces secrets disclosure established, which details remained unknown and how token permissions, replacement adoption and model artifact identity differ.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/hugging-face-spaces-2024-secret-disclosure-token-scope/
Language: en

Hugging Face's May 31, 2024 disclosure concerns unauthorized access to its Spaces platform, specifically Spaces secrets. The company said it suspected that a subset of secrets could have been accessed and revoked a number of Hugging Face tokens found in those secrets. This historical incident is a useful case for understanding how credentials connect an AI application to resources beyond its visible interface. [Original disclosure](https://huggingface.co/blog/space-secrets-disclosure).

## Preserve what the disclosure actually establishes

The notice reports detection earlier that week, token revocation and email notification to affected token owners. It does not publish a complete count of accessed secrets or affected users. Nor does it establish that model weights were modified. Treating possible credential exposure as proven tampering with every hosted model would go beyond the published evidence.

That distinction matters for an inference operator reading an incident report. A secret can authorize different resources depending on its permissions and the receiving service. The existence of a token in a workload does not, on its own, identify every action an unauthorized party performed. Incident scope and possible credential capability require separate evidence.

## The announced changes addressed credential handling

The company described removing organization tokens, introducing a key management service for Spaces secrets and expanding detection and proactive invalidation of leaked tokens. It also said external forensic specialists were involved. These are the remediation measures announced in the historical notice; they do not supply a benchmark for detection coverage or prove that every downstream credential was replaced.

The same notice recommended refreshing keys and tokens and moving toward fine-grained access. Its statement about future deprecation of classic tokens was a plan at publication time. Current access behavior should be checked in current product documentation rather than inferred from that old announcement.

## Permissions determine the reach of a leaked token

The [current token documentation](https://huggingface.co/docs/hub/security-tokens) distinguishes read, write and fine-grained access. Fine-grained tokens can be limited to specific resources. It recommends a separate token for each application or use, so one credential can be invalidated without necessarily disrupting every other workload.

For a concrete model worker, the useful question is which accepted repository or operation requires authentication. A credential used only to read a particular artifact has a different permission boundary from a broadly writable account token. This is an operational implication of the documentation, not a claim that a specific permission configuration was used by the affected Spaces.

## Issuing a replacement and adopting it are different events

After replacement, a running application may still hold an old value in memory, an environment variable or another configured location. The [credential reload guide](/journal/kubernetes-secret-volume-rotation/) explains this distinction for Kubernetes workloads. Its mechanics should not be assumed to describe the internal Spaces platform, but the general verification question remains: has the intended application adopted the replacement credential?

Keep issuer-side invalidation, application adoption and successful access to the intended resource as separate records. A successful request with the new token does not by itself establish what happened before revocation. Likewise, a rejected old credential confirms its current access outcome, not the absence of prior disclosure.

## Separate credential scope from artifact identity

If a token could write to a model repository, artifact review is another question requiring its own evidence. The [safetensors artifact guide](/journal/safetensors-artifact-validation/) distinguishes file identity, serialization and associated executable code. It does not turn an unmodified checksum from an unverified source into proof of provenance.

The Spaces disclosure supports a precise historical lesson: credentials stored inside an AI application can connect its security boundary to other resources. Understanding that connection requires the actual token scope and artifact history, while the public notice's unknowns should remain explicit.

## Sources

- [May 2024 Spaces secrets disclosure](https://huggingface.co/blog/space-secrets-disclosure).
- [Current Hugging Face token roles and management](https://huggingface.co/docs/hub/security-tokens).
