Gradio CVE-2026-134825: A Forged Host Header Could Borrow Your Hugging Face Token
CVE-2026-134825 is an authentication bypass in Gradio 6.27.0 up to, but not including, 6.32.0. A remote visitor could send a forged Host: localhost header and make the app's run history feature use the operator's locally saved Hugging Face token to list, read and write buckets. Upgrading to Gradio 6.32.0 removes that token fallback.
On this page
What the Gradio advisory describes
Gradio, the Python library that puts a web interface on top of a model in a few lines of code, has a newly published vulnerability in its run history feature. CVE-2026-134825, published on 22 November 2026, affects Gradio versions from 6.27.0 up to, but not including, 6.32.0.
According to the advisory text, the vulnerable code in gradio/history.py decided whether a request came from the same machine by trusting the Host header. A remote, unauthenticated attacker could send a request with a forged Host: localhost header and pass that check. When that happened, run history fell back to the Hugging Face token the operator had saved on that machine, so the attacker could list buckets, read records and assets, and write to buckets under the operator's account. The advisory adds that when ssr_mode is enabled, requests proxied through Gradio's local Node server also passed the loopback check.
The sources describe the attacker using the token to act on the operator's behalf. They do not say the token string itself was disclosed, so this is best read as account misuse rather than a token leak. No source reports exploitation in the wild, and Strix lists the flaw as not being in CISA's Known Exploited Vulnerabilities catalog.
Why local AI developers should care
The token at stake is the one many developers create with a single hf auth login command on their workstation so that model downloads just work. The fix's pull request explains that run history used to fall back to that host token because a request appeared to come from the same machine. That is a convenient assumption on a laptop and a risky one the moment the app is reachable by anyone else.
Gradio apps are often exposed beyond localhost on purpose: shared links, tunnels, LAN demos, and reverse proxies are all common ways to show a model to a colleague. Any of those turns a check that trusts a client-supplied header into something an outside visitor can satisfy. CuriousLM saw the same pattern earlier this month in GPUStack, where trusting a loopback source gave unauthenticated users admin access to a local inference server. The lesson repeats: a header or source address is not proof that a request came from the owner.
The severity ratings differ depending on the scoring system. Strix labels the flaw medium with a CVSS 3.1 score of 6.5, while VulnCheck labels it high with a CVSS 4.0 score of 8.3; both list the same 4.0 vector, and the gap comes from the different scoring versions. VulnCheck credits Zachariah Mithani of AploSec with the report.
The fix shipped as a feature ten days earlier
Gradio 6.32.0 is the fixed release. Its release notes include pull request 14050, merged on 10 November, under Features with the title "Use the visitor's own HF token for run history buckets". The release notes do not label it a security fix, and the pull request description does not mention a vulnerability. Anyone who updated after the release on 12 November already has the change, but anyone who skimmed the notes for security items would not have seen a reason to hurry.
The change removes the host-token fallback entirely: each visitor now uses their own Hugging Face token for run history, and local developers paste a token once per app launch.
What to do now
- Upgrade to Gradio 6.32.0 or later, which is the only remedy the advisories give.
- If you ran an affected version that was reachable from other machines, review the Hugging Face buckets tied to your account for unexpected records or writes, and rotate your token if anything looks wrong. This is a precaution, not advice from the advisories.
- Use fine-grained Hugging Face tokens with only the permissions a project needs, so a borrowed token can do less.
- Keep demo apps bound to localhost unless you mean to share them, and put real authentication in front of anything you expose.