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

More on this: every self-hosted models & ai servers story and our related guide.

Tools involved

Gradio stories, Hugging Face stories

Related stories

Source: original post on GitHub Advisory Database ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.