Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-27167

CVE-2026-27167: Gradio Information Disclosure Vulnerability

CVE-2026-27167 is an information disclosure vulnerability in Gradio that allows remote attackers to steal Hugging Face access tokens through mocked OAuth routes. This article covers technical details, affected versions, and mitigation.

Published: March 6, 2026

CVE-2026-27167 Overview

CVE-2026-27167 is a credential exposure vulnerability in Gradio, an open-source Python package designed for quick prototyping of machine learning applications. 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. This flaw allows remote attackers to steal the server owner's Hugging Face access token through a trivially exploitable authentication flow.

Critical Impact

Remote attackers can steal server owner Hugging Face tokens from any network-accessible Gradio application using OAuth components, potentially compromising associated machine learning models, datasets, and organizational resources.

Affected Products

  • Gradio versions 4.16.0 through 6.5.x
  • Gradio applications using OAuth components (gr.LoginButton, etc.)
  • Deployments running outside of Hugging Face Spaces environment

Discovery Timeline

  • 2026-02-27 - CVE CVE-2026-27167 published to NVD
  • 2026-03-05 - Last updated in NVD database

Technical Details for CVE-2026-27167

Vulnerability Analysis

This vulnerability stems from insecure credential handling in Gradio's OAuth implementation (CWE-522: Insufficiently Protected Credentials). When a Gradio application uses OAuth components like gr.LoginButton and runs outside the Hugging Face Spaces environment, the framework automatically enables "mocked" OAuth routes intended for development purposes. These mocked routes create a dangerous authentication flow that exposes the server owner's credentials.

When any visitor accesses the /login/huggingface endpoint, the server retrieves its own Hugging Face access token via the huggingface_hub.get_token() function and stores it directly in the visitor's session cookie. This means any remote attacker who can reach the application over the network can trigger this flow and receive the server owner's token.

Compounding the issue, the session cookie is signed using a hardcoded secret derived from the string "-v4", making the cookie payload trivially decodable by anyone with knowledge of this static secret. This allows attackers to easily extract the Hugging Face token from the stolen session cookie.

Root Cause

The root cause of this vulnerability is the automatic enablement of development-mode OAuth mocking in production environments combined with the use of a hardcoded cryptographic secret. The mocked OAuth flow was likely intended for local development and testing but was inadvertently activated on network-accessible deployments. The hardcoded secret "-v4" used for session cookie signing eliminates any cryptographic protection for the sensitive token data stored in the session.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by simply sending an HTTP request to the /login/huggingface endpoint on any vulnerable Gradio application that is network-accessible and uses OAuth components.

The exploitation flow involves:

  1. The attacker identifies a network-accessible Gradio application using OAuth components
  2. The attacker sends a request to the /login/huggingface endpoint
  3. The server retrieves its own Hugging Face token via huggingface_hub.get_token()
  4. The server stores this token in a session cookie and returns it to the attacker
  5. The attacker decodes the session cookie using the known hardcoded secret derived from "-v4"
  6. The attacker extracts the Hugging Face access token for unauthorized use

No proof-of-concept code has been published. For technical implementation details, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-27167

Indicators of Compromise

  • Unexpected HTTP requests to /login/huggingface endpoints from external IP addresses
  • Unusual activity on Hugging Face accounts associated with Gradio server tokens
  • Session cookie extraction attempts or large numbers of authentication requests
  • Unauthorized access to Hugging Face models, datasets, or spaces linked to compromised tokens

Detection Strategies

  • Monitor web server access logs for requests to /login/huggingface from untrusted sources
  • Implement alerting for abnormal authentication patterns on Gradio application endpoints
  • Review Hugging Face account activity logs for unauthorized API calls or resource modifications
  • Deploy network-level monitoring to detect reconnaissance against OAuth endpoints

Monitoring Recommendations

  • Enable detailed access logging for all Gradio application endpoints
  • Configure Hugging Face account audit logs and review them regularly for suspicious activity
  • Implement rate limiting and anomaly detection on authentication-related endpoints
  • Consider deploying a Web Application Firewall (WAF) to filter malicious requests to sensitive routes

How to Mitigate CVE-2026-27167

Immediate Actions Required

  • Upgrade Gradio to version 6.6.0 or later immediately
  • Rotate any Hugging Face tokens that may have been exposed on vulnerable deployments
  • Audit Hugging Face account activity for signs of unauthorized access
  • Review network access controls for Gradio applications to restrict exposure

Patch Information

The vulnerability is addressed in Gradio version 6.6.0, which disables the automatic mocked OAuth routes and implements proper secret management. Organizations should upgrade to this version or later as soon as possible. Detailed patch information is available in the GitHub Security Advisory for GHSA-h3h8-3v2v-rg7m.

Workarounds

  • Restrict network access to Gradio applications using firewall rules or network segmentation
  • Avoid using OAuth components (gr.LoginButton) in Gradio versions prior to 6.6.0
  • Deploy vulnerable applications only within Hugging Face Spaces environment where mocked routes are not enabled
  • Implement reverse proxy authentication to protect sensitive endpoints from external access
bash
# Example: Restrict access to Gradio application using iptables
# Allow only internal network access to Gradio port (default 7860)
iptables -A INPUT -p tcp --dport 7860 -s 10.0.0.0/8 -j ACCEPT
iptables -A INPUT -p tcp --dport 7860 -s 192.168.0.0/16 -j ACCEPT
iptables -A INPUT -p tcp --dport 7860 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechGradio

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-522
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-28414: Gradio Path Traversal Vulnerability

  • CVE-2026-28415: Gradio OAuth CSRF Vulnerability

  • CVE-2026-28416: Gradio SSRF Vulnerability in gr.load()

  • CVE-2025-23042: Gradio Auth Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English