# CVE-2024-47872: Cross-site Scripting on Gradio server via upload of HTML files, JS files, or SVG files

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 21% of CVEs (2026-12-01)
- Published: 2024-10-10T22:09:44.000Z
- Modified: 2026-06-17T07:57:53.587Z
- Also known as: GHSA-gvv6-33j7-884g, PYSEC-2024-220
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

Gradio is an open-source Python package designed for quick prototyping. This vulnerability involves **Cross-Site Scripting (XSS)** on any Gradio server that allows file uploads. Authenticated users can upload files such as HTML, JavaScript, or SVG files containing malicious scripts. When other users download or view these files, the scripts will execute in their browser, allowing attackers to perform unauthorized actions or steal sensitive information from their sessions. This impacts any Gradio server that allows file uploads, particularly those using components that process or display user-uploaded files. Users are advised to upgrade to `gradio>=5` to address this issue. As a workaround, users can restrict the types of files that can be uploaded to the Gradio server by limiting uploads to non-executable file types such as images or text. Additionally, developers can implement server-side validation to sanitize uploaded files, ensuring that HTML, JavaScript, and SVG files are properly handled or rejected before being stored or displayed to users.

(As written by CVE List.)

## Affected

- gradio-app gradio: < 5.0
- gradio_project gradio: before 5.0; before 5.0.0
- gradio (PyPI): before 5.0.0

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/gradio-app/gradio/security/advisories/GHSA-gvv6-33j7-884g> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-47872> (advisory)
- <https://github.com/gradio-app/gradio> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2024-220.yaml> (web)

## Sources

- CVE List: [CVE-2024-47872](https://www.cve.org/CVERecord?id=CVE-2024-47872), CVE Terms of Use, modified 2024-10-11
- GitHub Advisory Database: [GHSA-gvv6-33j7-884g](https://github.com/advisories/GHSA-gvv6-33j7-884g), CC-BY-4.0, modified 2025-01-21
- NVD: [CVE-2024-47872](https://nvd.nist.gov/vuln/detail/CVE-2024-47872), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-220](https://osv.dev/vulnerability/PYSEC-2024-220), CC-BY-4.0, modified 2025-01-19

---

Page: https://cve.day/CVE-2024-47872 · Whole record: https://cve.day/CVE-2024-47872.json · Rebuilt by cve.day 2026-11-25T22:58:46.642Z
