CVE-2024-1727
JSON

4.3medium

CSRF Vulnerability in gradio-app/gradio

Severity
4.3medium CVSS:3.0 by @huntr_ai
Exploit likelihood
0.35% (higher than 30% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-48cq-79qq-6f7xPYSEC-2026-1409

Description

A Cross-Site Request Forgery (CSRF) vulnerability in gradio-app/gradio allows attackers to upload multiple large files to a victim's system if they are running Gradio locally. By crafting a malicious HTML page that triggers an unauthorized file upload to the victim's server, an attacker can deplete the system's disk space, potentially leading to a denial of service. This issue affects the file upload functionality as implemented in gradio/routes.py.

Affected

Product or packageVersionsReported by
gradio-app gradio-app/gradiofrom unspecified before 4.19.2CVE List
gradio_project gradio4.16.0, from 4.16.0 before 4.19.2CVE List, NVD
gradio (PyPI)before 4.19.2GitHub Advisory Database, PyPA Advisory Database

All scores

@huntr_ai4.3medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
GitHub4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
PyPA Advisory Database4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L

Classification

CWE-352

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

A Cross-Site Request Forgery (CSRF) vulnerability in gradio-app/gradio allows attackers to upload multiple large files to a victim's system if they are running Gradio locally. By crafting a malicious HTML page that triggers an unauthorized file upload to the victim's server, an attacker can deplete the system's disk space, potentially leading to a denial of service. This issue affects the file upload functionality as implemented in gradio/routes.py.

GitHub Advisory Database
Impact

This CVE covers the ability of 3rd party websites to access routes and upload files to users running Gradio applications locally. For example, the malicious owners of www.dontvisitme.com could put a script on their website that uploads a large file to http://localhost:7860/upload and anyone who visits their website and has a Gradio app will now have that large file uploaded on their computer

Patches

Yes, the problem has been patched in Gradio version 4.19.2 or higher. We have no knowledge of this exploit being used against users of Gradio applications, but we encourage all users to upgrade to Gradio 4.19.2 or higher.

Fixed in: https://github.com/gradio-app/gradio/commit/84802ee6a4806c25287344dce581f9548a99834a CVE: https://nvd.nist.gov/vuln/detail/CVE-2024-1727

NVD (es)

Para evitar que sitios web maliciosos de terceros realicen solicitudes a aplicaciones de Gradio que se ejecutan localmente, este PR endurece las reglas CORS en torno a las aplicaciones de Gradio. En particular, verifica si el encabezado del host es localhost (o uno de sus alias) y, de ser así, requiere que el encabezado de origen (si está presente) también sea localhost (o uno de sus alias).

References

Sources

SourceRecordLicence
CVE ListCVE-2024-1727 changed 2024-08-01CVE Terms of Use
GitHub Advisory DatabaseGHSA-48cq-79qq-6f7x changed 2026-09-10CC-BY-4.0
NVDCVE-2024-1727 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1409 changed 2026-07-07CC-BY-4.0