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 package | Versions | Reported by |
|---|---|---|
| gradio-app gradio | < 5.0.0 | CVE List |
| gradio_project gradio | before 5.0.0 | CVE List, NVD |
| gradio (PyPI) | before 5.0.0 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 7.1high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| GitHub | 7.0high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
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>=5` para solucionar este problema. No existen soluciones workarounds para este problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-47870 changed 2024-10-11 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xh2x-3mrm-fwqm changed 2025-01-21 | CC-BY-4.0 |
| NVD | CVE-2024-47870 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2024-218 changed 2025-01-19 | CC-BY-4.0 |