Gradio: Mocked OAuth Login Exposes Server Credentials and Uses Hardcoded Session Secret
CVE-2026-27167 · GHSA-h3h8-3v2v-rg7m · published 2026-03-01 · updated 2026-06-05
- Severity
- Low
- CVSS score
- Not scored
- Chance of exploitation (EPSS)
- 0.51%
- Fixed in
- 6.6.0
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
Gradio applications running outside of Hugging Face Spaces automatically enable "mocked" OAuth routes when OAuth components (e.g. gr.LoginButton) are used. When a user visits /login/huggingface, the server retrieves its own Hugging Face access token via huggingfacehub.gettoken() and stores it in the visitor's session cookie. If the application is network-accessible, any remote attacker can trigger this flow to steal the server owner's HF token. The session cookie is signed with a hardcoded secret derived from the string "-v4", making the payload trivially decodable.
Upgrade gradio to 6.6.0 or later.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| gradio | PyPI | >= 4.16.0, < 6.6.0 | 6.6.0 |
- CriticalPhoenix: Format String Injection in applyChatTemplatearize-phoenix
- CriticalFlowise: Unauthenticated OAuth2 token refresh endpoint returns access tokens — enables token theft for any connected serviceflowise
- CriticalMLflow: Environment variable injection in AI Gateway secrets enables server-side credential exfiltrationmlflow
- CriticalvLLM has RCE In Video Processingvllm
- HighConfig revision hashes could expose password verifiersopenclaw
- Highn8n: Shared Credential Header Leak via HTTP Request Pagination Expressionn8n, n8n, n8n
- CriticalGradio Blocked Path ACL Bypass Vulnerabilitygradio
- CriticalGradio allows users to access arbitrary filesgradio
- CriticalGradio Exposure of Sensitive Information to an Unauthorized Actor vulnerabilitygradio
- CriticalFiles on the host computer can be accessed from the Gradio interfacegradio
- HighGradio FileExplorer preprocess path traversal allows files outside root_dir to reach callbacksgradio
- HighGradio contains a cookie injection vulnerabilitygradio
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.