{"id":"CVE-2024-47870","aliases":["CVE-2024-47870","GHSA-xh2x-3mrm-fwqm","PYSEC-2024-218"],"related":[],"kind":"vulnerability","state":"published","title":"Race condition in update_root_in_config may redirect user traffic in Gradio","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact  \n**What kind of vulnerability is it? Who is impacted?**\n\nThis 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.\n\n### Patches  \nYes, please upgrade to `gradio>=5` to address this issue.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-10-10T22:04:21.000Z","modified":"2026-06-17T07:57:53.347Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H","score":7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"version":"< 5.0.0","status":"affected"}],"vendor":"gradio-app","product":"gradio","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"5.0.0","status":"affected"}],"vendor":"gradio_project","product":"gradio","cpe":"cpe:2.3:a:gradio_project:gradio:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.0.0"}],"ecosystem":"PyPI","package":"gradio","purl":"pkg:pypi/gradio","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.0.0"}],"vendor":"gradio_project","product":"gradio","cpe":"cpe:2.3:a:gradio_project:gradio:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.0.0"}],"ecosystem":"PyPI","package":"gradio","purl":"pkg:pypi/gradio","source":"pysec"}],"references":[{"url":"https://github.com/gradio-app/gradio/security/advisories/GHSA-xh2x-3mrm-fwqm","tags":["advisory","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47870","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/gradio-app/gradio","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2024-218.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-10-11T15:16:16.842Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47870","url":"https://www.cve.org/CVERecord?id=CVE-2024-47870","licence":"CVE Terms of Use","modified":"2024-10-11T15:17:49.588Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xh2x-3mrm-fwqm","url":"https://github.com/advisories/GHSA-xh2x-3mrm-fwqm","licence":"CC-BY-4.0","modified":"2025-01-21T17:27:41.918Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47870","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47870","licence":"Public domain","modified":"2026-06-17T07:57:53.347Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-218","url":"https://osv.dev/vulnerability/PYSEC-2024-218","licence":"CC-BY-4.0","modified":"2025-01-19T22:56:53.228Z"}],"updatedAt":"2026-11-25T22:58:46.641Z","epss":{"score":0.00372,"percentile":0.33184,"date":"2026-12-01T12:00:22.000Z"}}