CVE-2024-47872: Gradio has an XSS on every Gradio server via upload of HTML files, JS files, or SVG files
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.24049%
CWE
Published
10/10/2024
Updated
1/21/2025
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
gradio | pip | < 5.0.0 | 5.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insufficient file type validation and unsafe file serving practices. While explicit code references are unavailable, Gradio's architecture suggests:
- Upload handlers (routes.py) would process file submissions
- Components (components.py) would control how files are rendered
- Core utilities (utils.py) would handle file serving mechanics In pre-5.0 versions, these likely lacked:
- File extension/MIME type allowlisting
- Content-Disposition: attachment headers for non-image files
- SVG XML sanitization Confidence is medium due to inferential analysis of typical web app patterns, though without direct commit evidence.