Skip to content
MediumVulnerability

CVE-2024-47872: Gradio cross-site scripting through uploaded HTML, JavaScript, or SVG files

Identifier
CVE-2024-47872
Published
Record updated
View JSON
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.