CVE-2025-23042

7.5 HIGH

📋 TL;DR

This vulnerability allows attackers to bypass Gradio's file access controls by changing the letter case of blocked file paths on case-insensitive file systems. It affects Gradio users on Windows and macOS who haven't updated to version 5.6.0, potentially exposing sensitive files that should be protected by ACL restrictions.

💻 Affected Systems

Products:
  • gradio
Versions: All versions before 5.6.0
Operating Systems: Windows, macOS
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects case-insensitive file systems (Windows, macOS). Linux systems with case-sensitive file systems are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain unauthorized access to sensitive files containing credentials, configuration data, or proprietary machine learning models, leading to data breaches and system compromise.

🟠

Likely Case

Unauthorized access to files within Gradio's accessible directories, potentially exposing application data, logs, or configuration files.

🟢

If Mitigated

Limited impact with proper network segmentation and minimal sensitive files in accessible directories.

🌐 Internet-Facing: HIGH - Gradio applications are often deployed as web interfaces, making them directly accessible to attackers who can exploit this bypass.
🏢 Internal Only: MEDIUM - Internal deployments still risk unauthorized access from authenticated users or compromised internal systems.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires knowledge of blocked file paths and ability to modify URL/file path case. No authentication bypass - only bypasses file path restrictions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.6.0

Vendor Advisory: https://github.com/gradio-app/gradio/security/advisories/GHSA-j2jg-fq62-7c3h

Restart Required: No

Instructions:

1. Update Gradio using pip: 'pip install --upgrade gradio==5.6.0' 2. Verify the update with 'pip show gradio' 3. Restart any running Gradio applications

🔧 Temporary Workarounds

No workarounds available

all

The vendor advisory states there are no known workarounds for this vulnerability.

🧯 If You Can't Patch

  • Migrate to Linux with case-sensitive file systems where the vulnerability does not apply
  • Implement strict network access controls to limit exposure of Gradio applications

🔍 How to Verify

Check if Vulnerable:

Check Gradio version with 'pip show gradio | grep Version'. If version is below 5.6.0 and running on Windows/macOS, system is vulnerable.

Check Version:

pip show gradio | grep Version

Verify Fix Applied:

Confirm version is 5.6.0 or higher with 'pip show gradio | grep Version' and test file access with case variations.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed file access attempts with case variations
  • Access to files outside expected directories

Network Indicators:

  • HTTP requests with unusual case patterns in file paths
  • Access to blocked file extensions with case variations

SIEM Query:

source="gradio" AND (path:* OR file:* OR access:* AND (case OR uppercase OR lowercase OR variation))

🔗 References

📤 Share & Export