# CVE-2026-27167: Gradio: Mocked OAuth Login Exposes Server Credentials and Uses Hardcoded Session Secret

- Severity: None 0.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.50%, higher than 44% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-27T21:40:57.917Z
- Modified: 2026-06-17T10:26:46.917Z
- Also known as: GHSA-h3h8-3v2v-rg7m, PYSEC-2026-63
- Weaknesses: CWE-522, CWE-798
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Gradio is an open-source Python package designed for quick prototyping. Starting in version 4.16.0 and prior to version 6.6.0, 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 `huggingface_hub.get_token()` 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. Version 6.6.0 fixes the issue.

(As written by CVE List.)

## Affected

- gradio-app gradio: >= 4.16.0, < 6.6.0
- gradio (PyPI): from 4.16.0 before 6.6.0
- gradio_project gradio: from 4.16.0 before 6.6.0

## Every score

- GitHub_M: CVSS:3.1 0.0 None `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:N`
- GitHub: CVSS:3.1 0.0 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:N`
- NVD: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/gradio-app/gradio/security/advisories/GHSA-h3h8-3v2v-rg7m> (exploit, evidence, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-27167> (advisory)
- <https://github.com/gradio-app/gradio/commit/dfee0da06d0aa94b3c2684131e7898d5d5c1911e> (web)
- <https://github.com/gradio-app/gradio> (package)
- <https://github.com/gradio-app/gradio/releases/tag/gradio@6.6.0> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2026-63.yaml> (web)

## Sources

- CVE List: [CVE-2026-27167](https://www.cve.org/CVERecord?id=CVE-2026-27167), CVE Terms of Use, modified 2026-03-02
- GitHub Advisory Database: [GHSA-h3h8-3v2v-rg7m](https://github.com/advisories/GHSA-h3h8-3v2v-rg7m), CC-BY-4.0, modified 2026-06-05
- NVD: [CVE-2026-27167](https://nvd.nist.gov/vuln/detail/CVE-2026-27167), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-63](https://osv.dev/vulnerability/PYSEC-2026-63), CC-BY-4.0, modified 2026-05-20

---

Page: https://cve.day/CVE-2026-27167 · Whole record: https://cve.day/CVE-2026-27167.json · Rebuilt by cve.day 2026-11-25T22:59:15.047Z
