Update Gradio to 6.32.0+ if you self-host a Gradio app
Gradio 6.27.0 before 6.32.0: a forged 'Host: localhost' header let strangers use the operator's own Hugging Face token (CVE-2026-134825) · Security incident · GitHub Advisory Database · gradio-app · Nov 23, 2026
What happened
The advisory says Gradio 6.27.0 before 6.32.0 trusted requests that looked local, so with SSR mode on, a remote attacker sending a forged Host: localhost header could call run-history endpoints with the operator's saved Hugging Face token to list, read and write buckets in their account. Gradio's fix now uses the visitor's own token.
How to prevent it
Update Gradio to 6.32.0 or later, don't stay logged in with a broad Hugging Face token on a machine that serves a public app, and use fine-grained tokens scoped to one bucket.
Fix prompt for your own AI tool
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I run Gradio (or another self-hosted model server) for my app. Help me check it isn't open to strangers. 1) Find every place I start a model server (Ollama, llama.cpp, vLLM, Gradio, LM Studio) and tell me which address and port it listens on. Flag anything bound to 0.0.0.0 or a public IP. 2) Check whether the server needs a login or API key, and if not, show me how to bind it to 127.0.0.1 or put an authenticating reverse proxy in front. 3) Check the installed version against the latest release notes and tell me if I'm behind on a security fix. 4) List which models I download, who published them, and whether any load with trust_remote_code or pickle files; suggest safer formats like safetensors. 5) Give me a short checklist to re-run after every update. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Why this keeps happening: self-hosted models & ai servers
Model servers such as Ollama, llama.cpp, vLLM and Gradio were built for a trusted laptop or lab. Many have no login, and one setting change puts them on a public address. Model files can also carry code that runs when they load.
A quick checklist before you ship
- Check which address each model server listens on and bind it to localhost or a private network.
- Put an authenticating proxy in front of anything that must be reachable remotely.
- Update model servers as often as your app dependencies.
- Download models only from the original publisher, prefer safetensors, and keep trust_remote_code off.
More on this: every self-hosted models & ai servers story and our related guide.
Tools involved
Gradio stories, Hugging Face stories
Related stories
- Update llama.cpp to b12658+ and never expose its RPC server
llama.cpp RPC server: unauthenticated attackers could write to memory and possibly run code (CVE-2026-137567, critical), fixed in b12658 - Never expose Ollama to the internet without a login
Rapid7: 54.8% of 7,675 exposed Ollama servers already carried models planted by strangers - Don't load Hugging Face models with trust_remote_code blindly
JFrog: a fake 'llama-3.2-1b-tuned' on Hugging Face stole cloud credentials on load, built and re-packaged by an AI agent
Source: original post on GitHub Advisory Database ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.