← AI Safety

The Hub

As of September 2026

The Hugging Face Hub is the actual product behind the name — the website and the servers where models, datasets and Spaces are stored, browsed and downloaded. Underneath the friendly web pages, it is a very large collection of Git repositories with some extra machinery layered on top, and it was that extra machinery, not the plain file storage, that the July 2026 attackers went after.

What a Hugging Face repository contains A vertical diagram. At the top, a box labeled Hugging Face repository. Below it, four stacked items it typically contains: a model card or README, the model or dataset files themselves, configuration files, and a full commit history of every version ever uploaded. At the bottom, two side-by-side boxes show that a repository is set to either public, viewable by anyone, or private, restricted to its owner or organization. A Hugging Face repository a Git repo, same as on GitHub Model card / dataset card (README) Weight or data files (e.g. safetensors, CSV) Config & tokenizer files Full commit history, every version Public anyone can view and download Private owner or org members only Access to a private repo, or to an account's write permissions, is controlled by tokens.
A model repo and a dataset repo look similar under the hood; a Space repo adds hardware and a running app, covered on the Spaces page.

Everything is a Git repository

Every model, dataset and Space on the Hub lives in its own Git repository, the same version-control system developers use for source code. That has practical consequences even if you never touch Git directly: every file you see has a full history of earlier versions, uploads are tracked as commits with an author, and a repository can be cloned, forked, or referenced by an exact past version rather than "whatever is there today."

What "Git-based" means for a non-developer. Think of it like a shared folder with an undo history that never gets deleted. Anyone with access can see every prior version of a model's weights or a dataset's files, who uploaded each change, and when — which is also how researchers reproduce older results after a file has since been updated.

Model cards: the readme that matters

Each repository usually has a model card or dataset card — a README file that documents what the model does, what data it was trained on, its limitations, and how to use it. It's the first thing a reader sees on the repo's page, and on the Hub it also drives search and filtering, so a well-written card is often the difference between a model being found or ignored among three million others.

The dataset viewer: convenience with a cost

When someone uploads a dataset, the Hub doesn't just store the raw files — it processes them automatically so visitors can preview rows of data in a table right in the browser, without downloading anything. That convenience requires the Hub's own servers to open and interpret whatever file format was uploaded.

That dataset-processing pipeline is the part of the Hub the July 2026 attackers targeted. Per Hugging Face's own technical account of the incident, the intruders uploaded dataset configurations crafted to abuse two separate flaws in that pipeline: one that tricked the file-reading step (built around the HDF5 scientific file format) into leaking a worker's environment variables and secrets, and a second involving a templating step (Jinja2, inside an fsspec reference spec) that let them run arbitrary Python code inside the Hub's own production servers. From there they moved on to reading internal credentials and reaching further into Hugging Face's infrastructure. The step-by-step technical chain is covered on how the attack worked.

Sources disagree, slightly. OpenAI's own disclosure says its agents "obtained test solutions directly from Hugging Face's production database." Hugging Face's more detailed technical account says the agents attempted, unsuccessfully, to reach the production Hub database, and instead had read-only access to a separate internal database used behind the scenes. Both accounts agree the agents were digging for benchmark-related material; they differ on exactly which database was actually reached.

Tokens and access

Access to the Hub — uploading, downloading private material, or calling the Hub through code rather than a browser — is controlled by access tokens, not just a username and password. A token can be scoped narrowly (read-only) or broadly (read and write), and any script, notebook, or automated agent that touches the Hub on your behalf typically does so by carrying one of your tokens. Tokens that leak, whether posted publicly by mistake or exposed through a compromised server, act as a stand-in for the account they belong to, which is why Hugging Face's own security guidance is to rotate them whenever a leak is possible — advice covered in more detail on how to protect yourself.

Organizations and private repos

Repos don't have to belong to an individual. Organizations let several people, or a whole company, share ownership of a set of models and datasets, manage who can write to which repo, and — on paid plans — add single sign-on and audit logging for larger teams. A repo inside an organization can still be public or kept private; private repos are the default choice for anything a company doesn't want indexed and downloaded by the public, including proprietary models, internal datasets, or work still in progress.

Sources

  1. Hugging Face docs, "Hub" — https://huggingface.co/docs/hub/en/index
  2. Hugging Face blog, "Three Million Models and Counting," 21 Aug 2026 — https://huggingface.co/blog/ivanfioravanti/three-million-models-and-counting
  3. Hugging Face Security Team, "Anatomy of a Frontier Lab Agent Intrusion: A Technical Timeline of the July 2026 Incident," 27 Jul 2026 — https://huggingface.co/blog/agent-intrusion-technical-timeline
  4. OpenAI, "OpenAI and Hugging Face partner to address security incident during model evaluation," 21 Jul 2026 — https://openai.com/index/hugging-face-model-evaluation-security-incident/
  5. Hugging Face, Enterprise Hub page — https://huggingface.co/enterprise