CVE-2024-47871
📋 TL;DR
This vulnerability allows attackers to intercept and read files uploaded to Gradio servers when using the share=True option, as HTTPS is not enforced. It affects users who publicly share Gradio demos over the internet without proper encryption, potentially exposing sensitive data. Attackers can also modify responses or data sent between client and server.
💻 Affected Systems
- gradio
📦 What is this software?
Gradio by Gradio Project
⚠️ Risk & Real-World Impact
Worst Case
Complete exposure of all uploaded sensitive files (documents, images, data) and ability to inject malicious content into communications between users and the Gradio application.
Likely Case
Interception of uploaded files containing personal or business data, leading to data breaches and privacy violations.
If Mitigated
No data exposure when proper HTTPS encryption is implemented or when share=True is avoided in production.
🎯 Exploit Status
Attack requires network position to intercept unencrypted traffic between FRP client and server
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: gradio>=5
Vendor Advisory: https://github.com/gradio-app/gradio/security/advisories/GHSA-279j-x4gx-hfrh
Restart Required: Yes
Instructions:
1. Check current gradio version with 'pip show gradio'. 2. Upgrade using 'pip install --upgrade gradio>=5'. 3. Restart any running Gradio applications.
🔧 Temporary Workarounds
Disable share=True in production
allAvoid using share=True option in production environments to prevent insecure public sharing
Modify Gradio application code to remove or set share=False
Host with HTTPS
allDeploy Gradio applications on servers with proper HTTPS/TLS encryption enabled
Deploy behind reverse proxy (nginx/apache) with SSL certificates
Use cloud platforms with built-in HTTPS
🧯 If You Can't Patch
- Disable share=True option immediately in all production deployments
- Implement network-level encryption (VPN, TLS termination proxy) for all Gradio traffic
🔍 How to Verify
Check if Vulnerable:
Check if using gradio version <5 AND using share=True option in code
Check Version:
pip show gradio | grep Version
Verify Fix Applied:
Verify gradio version is >=5 with 'pip show gradio' and confirm share=True is not used in production
📡 Detection & Monitoring
Log Indicators:
- Unencrypted file uploads to Gradio endpoints
- HTTP traffic to Gradio share URLs without HTTPS
Network Indicators:
- Unencrypted HTTP traffic to/from *.gradio.live domains
- File uploads over plain HTTP
SIEM Query:
source_port:7860 AND protocol:http AND NOT protocol:https