CVE-2024-47870
JSON

7.1high

Race condition in update_root_in_config may redirect user traffic in Gradio

Severity
7.1high CVSS:4.0 by GitHub_M
Exploit likelihood
0.37% (higher than 33% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-xh2x-3mrm-fwqmPYSEC-2024-218

Description

Gradio is an open-source Python package designed for quick prototyping. This vulnerability involves a **race condition** in the `update_root_in_config` function, allowing an attacker to modify the `root` URL used by the Gradio frontend to communicate with the backend. By exploiting this flaw, an attacker can redirect user traffic to a malicious server. This could lead to the interception of sensitive data such as authentication credentials or uploaded files. This impacts all users who connect to a Gradio server, especially those exposed to the internet, where malicious actors could exploit this race condition. Users are advised to upgrade to `gradio>=5` to address this issue. There are no known workarounds for this issue.

Affected

Product or packageVersionsReported by
gradio-app gradio< 5.0.0CVE List
gradio_project gradiobefore 5.0.0CVE List, NVD
gradio (PyPI)before 5.0.0GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M7.1high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
GitHub7.0high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
NVD8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory Database8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-362

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Gradio is an open-source Python package designed for quick prototyping. This vulnerability involves a **race condition** in the `update_root_in_config` function, allowing an attacker to modify the `root` URL used by the Gradio frontend to communicate with the backend. By exploiting this flaw, an attacker can redirect user traffic to a malicious server. This could lead to the interception of sensitive data such as authentication credentials or uploaded files. This impacts all users who connect to a Gradio server, especially those exposed to the internet, where malicious actors could exploit this race condition. Users are advised to upgrade to `gradio>=5` to address this issue. There are no known workarounds for this issue.

GitHub Advisory Database
Impact

What kind of vulnerability is it? Who is impacted?

This vulnerability involves a race condition in the update_root_in_config function, allowing an attacker to modify the root URL used by the Gradio frontend to communicate with the backend. By exploiting this flaw, an attacker can redirect user traffic to a malicious server. This could lead to the interception of sensitive data such as authentication credentials or uploaded files. This impacts all users who connect to a Gradio server, especially those exposed to the internet, where malicious actors could exploit this race condition.

Patches

Yes, please upgrade to gradio>=5 to address this issue.

NVD (es)

Gradio es un paquete Python de código abierto diseñado para la creación rápida de prototipos. Esta vulnerabilidad implica una **condición de ejecución** en la función `update_root_in_config`, que permite a un atacante modificar la URL `root` utilizada por el frontend de Gradio para comunicarse con el backend. Al explotar esta falla, un atacante puede redirigir el tráfico de usuarios a un servidor malicioso. Esto podría llevar a la interceptación de datos confidenciales, como credenciales de autenticación o archivos cargados. Esto afecta a todos los usuarios que se conectan a un servidor Gradio, especialmente a aquellos expuestos a Internet, donde los actores maliciosos podrían explotar esta condición de ejecución. Se recomienda a los usuarios que actualicen a `gradio&gt;=5` para solucionar este problema. No existen soluciones workarounds para este problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-47870 changed 2024-10-11CVE Terms of Use
GitHub Advisory DatabaseGHSA-xh2x-3mrm-fwqm changed 2025-01-21CC-BY-4.0
NVDCVE-2024-47870 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-218 changed 2025-01-19CC-BY-4.0