Incident report

Gradio Uploaded File Stored Cross-Site Scripting via Disguised HTML/SVG Assets

CVE-2024-47872 (published October 10, 2024) exposed a stored cross-site scripting (XSS) vulnerability in Gradio (`< 5.0`) deployments supporting user file uploads. Attackers could upload active HTML, JavaScript, or SVG documents disguised as benign data files, which Gradio subsequently served inline with executable MIME types in the application's origin. When reviewers or admins opened uploaded evaluation samples, embedded scripts executed in their browser session and stole cookies or invoked authenticated ML APIs. Gradio 5.0 remediated file-serving headers and enforced safer content-disposition policies.

Incident record

Reported
Severity
Medium
Vector
Data Exfiltration
Affected system type
Multi-User ML Demo & Evaluation Web Apps
Reference
CVE-2024-47872
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-47872

Inspect in Interactive Incidents Hub

Defensive lesson

Serve user-uploaded ML artifacts with Content-Disposition: attachment, strict Content-Security-Policy headers, and isolated sandbox domains.

Referenced techniques