Vulnerabilities

CVE-2026-27167

Medium 5.9 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2026-02-27
Last modified
2026-06-17
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Scored by
nvd@nist.gov (NVD Primary)
Probability of exploitation
0.5 % higher than 37 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Not registered in the sources

Affected products

Vendor Product Versions Status
gradio (PyPI) ≥ 4.16.0, < 6.6.0 Affected
Gradio Project Gradio ≥ 4.16.0, < 6.6.0 Affected

Weakness type

Attack techniques

Derived through the weakness type: CVE to CWE to CAPEC to ATT&CK. This shows which techniques the weakness class is historically used for. It does not assert that this vulnerability has been exploited that way.

  • T1021: Remote Services lateral-movement
  • T1021.002: SMB/Windows Admin Shares lateral-movement
  • T1078: Valid Accounts stealth, persistence, privilege-escalation, initial-access
  • T1078.001: Default Accounts stealth, persistence, privilege-escalation, initial-access
  • T1110.004: Credential Stuffing credential-access
  • T1114.002: Remote Email Collection collection
  • T1133: External Remote Services persistence, initial-access
  • T1543: Create or Modify System Process persistence, privilege-escalation
  • T1550.002: Pass the Hash lateral-movement
  • T1550.003: Pass the Ticket lateral-movement
  • T1552.001: Credentials In Files credential-access
  • T1552.004: Private Keys credential-access
  • T1558: Steal or Forge Kerberos Tickets credential-access
  • T1558.003: Kerberoasting credential-access

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities