cve.bz

CVE-2026-27167 gradio project gradio: Insufficiently Protected Credentials

5.9 mediumExploit referenceEPSS 0.5%Fix available

Medium (5.9) in gradio project gradio. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in gradio 6.6.0.

On this page
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.

Severity

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
EPSS
0.5% (unchanged from 0.5% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 44th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-03-02. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-522 Insufficiently Protected Credentials
CWE-798 Use of Hard-coded Credentials
OWASP Top 10
A06:2025 Insecure Design, A07:2025 Authentication Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-27167 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-27167?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-27167?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-27167 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
gradio_project:gradiofrom 4.16.0 before 6.6.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-h3h8-3v2v-rg7mPyPIgradio>=4.16.0 <6.6.06.6.0
PYSEC-2026-63PyPIgradio>=4.16.0 <6.6.06.6.0

Red Hat

Red Hat rates this Low.

Red Hat's statement

This vulnerability in Gradio applications, specifically affecting `ansible-chatbot-service` in Ansible Services, allows a remote attacker to obtain the server owner's Hugging Face access token. This occurs when network-accessible Gradio applications utilize OAuth components outside of Hugging Face Spaces, leading to the automatic enablement of "mocked" OAuth routes. The session cookie, containing the token, is signed with a hardcoded secret, making it trivially decodable.

Red Hat's mitigation

To mitigate this issue, restrict network access to Gradio applications that utilize OAuth components and are deployed outside of Hugging Face Spaces. Implement firewall rules or a reverse proxy to limit exposure of the application's `/login/huggingface` endpoint to trusted networks only. If feasible, avoid using OAuth components in self-hosted Gradio deployments until a version with a proper fix is available.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-27167.

Attack patterns (CAPEC)

  • CAPEC-70 Try Common or Default Usernames and Passwords Likelihood: Medium · Severity: High
  • CAPEC-191 Read Sensitive Constants Within an Executable Severity: Low

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-522 (13).

References

Check your stackJSON