CVE-2024-47872: Gradio cross-site scripting through uploaded HTML, JavaScript, or SVG files
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2024-47872
- Published
- Record updated
- Affected
- gradio < 5.0.0
- Fixed in
- 5.0.0
- released October 9, 2024, 2 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.3%
Summary
CVE-2024-47872 affects Gradio, an open-source Python package for quick prototyping, on any server that allows file uploads. Authenticated users can upload HTML, JavaScript, or SVG files containing malicious scripts, which execute in other users' browsers when those files are downloaded or viewed, enabling unauthorized actions or theft of session information.
Mitigation
Users are advised to upgrade to `gradio>=5`. As a workaround, restrict uploads to non-executable file types such as images or text, and implement server-side validation that sanitizes uploaded files, ensuring HTML, JavaScript, and SVG files are properly handled or rejected before being stored or displayed.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- gradioPyPILLM dependency since 2023-03-14 · 11 tracked dependents
Related items
- MediumCVE-2026-121936: easyVoice server-side request forgery through openaiBaseUrl in /api/v1/ttsSimilar attack · NVD/CVE Database
- MediumCVE-2026-118628: MLflow get-artifacts server-side request forgery information disclosureSimilar attack · NVD/CVE Database
- HighCVE-2026-118625: MLflow Tracking Server privilege escalation via get_endpointsSimilar attack · NVD/CVE Database
- InfoWhen trust becomes the payload: Inside the threats, etc quarterly reportSimilar attack · Elastic Security Labs
- MediumCritical Langflow flaws enable authentication bypass and RCESimilar attack · CSO Online