A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2024-4941

CVE-2024-4941: Gradio Path Traversal Vulnerability

CVE-2024-4941 is a path traversal vulnerability in Gradio version 4.25 that allows attackers to read files on remote systems through improper JSON input validation. This article covers technical details, impact, and mitigation.

Published: June 9, 2026

CVE-2024-4941 Overview

CVE-2024-4941 is a local file inclusion (LFI) vulnerability in the JSON component of gradio-app/gradio version 4.25. The flaw resides in the postprocess() function within gradio/components/json_component.py, where user-controlled input is parsed as JSON without sufficient validation. When the parsed JSON contains a path key, the referenced file is copied to a temporary directory and becomes retrievable via the /file=.. endpoint. Attackers can leverage this behavior to read arbitrary files from the server hosting the Gradio application. The vulnerability is tracked under [CWE-22] (Path Traversal).

Critical Impact

Unauthenticated remote attackers can read arbitrary files from systems running vulnerable Gradio deployments, exposing source code, credentials, and configuration data.

Affected Products

  • gradio-app/gradio version 4.25 (Python package)
  • Applications built on Gradio that expose the JSON component
  • Hosted Gradio interfaces accessible over the network

Discovery Timeline

  • 2024-06-06 - CVE-2024-4941 published to NVD
  • 2025-10-15 - Last updated in NVD database

Technical Details for CVE-2024-4941

Vulnerability Analysis

The vulnerability stems from improper input validation in Gradio's JSON component. The postprocess() function accepts a user-controlled string and parses it directly as JSON. The resulting object is then passed to processing_utils.move_files_to_cache(), which recursively traverses any object looking for dictionaries containing a path key.

When a path value is found, the function copies the referenced file to a temporary cache directory managed by Gradio. That cached file is later accessible through the /file=.. HTTP endpoint, which serves cached resources to clients. Combining these two behaviors gives an attacker a primitive to exfiltrate arbitrary files readable by the Gradio process.

Because attacks require no authentication and no user interaction, any internet-facing Gradio 4.25 instance exposing the JSON component is reachable from the network.

Root Cause

The root cause is the lack of a type and source check on JSON objects produced by postprocess(). Gradio's caching layer treats any dictionary with a path field as a server-side file reference, regardless of whether the data originated from trusted internal code or untrusted user input. The patch introduces a dedicated JsonData wrapper class so the caching layer can distinguish trusted JSON payloads from user-supplied ones.

Attack Vector

An attacker sends a crafted JSON payload to the vulnerable Gradio endpoint with a path key pointing to a sensitive file such as /etc/passwd, application source code, or environment configuration. Gradio copies the file to its cache directory, then the attacker retrieves it through the /file=.. endpoint.

python
# Security patch (gradio/components/base.py)
 from gradio import utils
 from gradio.blocks import Block, BlockContext
 from gradio.component_meta import ComponentMeta
-from gradio.data_classes import GradioDataModel
+from gradio.data_classes import GradioDataModel, JsonData
 from gradio.events import EventListener
 from gradio.layouts import Form
 from gradio.processing_utils import move_files_to_cache

# Security patch (gradio/components/json_component.py)
 from gradio_client.documentation import document

 from gradio.components.base import Component
+from gradio.data_classes import JsonData
 from gradio.events import Events

Source: Gradio Commit ee1e2942. The fix introduces the JsonData class so move_files_to_cache() no longer treats arbitrary JSON dictionaries as file references during JSON component postprocessing.

Detection Methods for CVE-2024-4941

Indicators of Compromise

  • HTTP requests to Gradio endpoints containing JSON payloads with a path key referencing local files such as /etc/passwd, ~/.aws/credentials, or application source paths.
  • Unexpected GET requests to the /file=.. endpoint, especially with traversal sequences or references to files outside the application working directory.
  • New files appearing in Gradio's temporary cache directory that match sensitive system paths.

Detection Strategies

  • Inspect web server and reverse proxy logs for /file= requests targeting files outside the Gradio working directory.
  • Monitor application logs for JSON deserialization activity in gradio/components/json_component.py followed by file access in processing_utils.move_files_to_cache().
  • Apply web application firewall rules that flag inbound JSON bodies containing path keys with absolute filesystem paths.

Monitoring Recommendations

  • Track outbound responses from Gradio /file= endpoints for content matching sensitive file signatures such as root:x:0:0 or private key headers.
  • Alert on access to Gradio's temporary cache directory by processes other than the Gradio service.
  • Audit deployed Python package versions and flag any host running gradio 4.25 or earlier in the 4.x branch.

How to Mitigate CVE-2024-4941

Immediate Actions Required

  • Upgrade Gradio to a version that includes commit ee1e2942e0a1ae84a08a05464e41c8108a03fa9c or later, which introduces the JsonData wrapper and removes the unsafe path traversal behavior.
  • Restrict network exposure of Gradio interfaces by placing them behind authenticated reverse proxies or VPNs until patched.
  • Audit Gradio cache directories for files that should not have been exposed and rotate any credentials that may have been disclosed.

Patch Information

The vendor fix is available in the upstream repository. See the Gradio security commit and the Huntr bug bounty report for technical details. Update the gradio Python package using your package manager to a version newer than 4.25.

Workarounds

  • Remove or disable JSON components from Gradio applications until the package is upgraded.
  • Block requests to the /file= endpoint at the reverse proxy layer when not required by the application.
  • Run the Gradio process under a low-privilege account with filesystem access limited to required application directories only.
bash
# Upgrade Gradio to a patched version
pip install --upgrade 'gradio>4.25'

# Verify the installed version
python -c "import gradio; print(gradio.__version__)"

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGradio

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.69%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22

  • NVD-CWE-noinfo
  • Technical References
  • Huntr Bug Bounty Report
  • Vendor Resources
  • GitHub Commit Details
  • Related CVEs
  • CVE-2026-10783: Gradio Weak Hash Vulnerability

  • CVE-2026-48545: Gradio Auth Bypass Vulnerability

  • CVE-2026-8756: Bert-VITS2 Path Traversal Vulnerability

  • CVE-2026-27167: Gradio Information Disclosure Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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