# CVE-2024-47870: Race condition in update_root_in_config may redirect user traffic in Gradio

- Severity: High 7.1 (CVSS:4.0, scored by GitHub_M) `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`
- 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.37%, higher than 33% of CVEs (2026-12-01)
- Published: 2024-10-10T22:04:21.000Z
- Modified: 2026-06-17T07:57:53.347Z
- Also known as: GHSA-xh2x-3mrm-fwqm, PYSEC-2024-218
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

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

## Every score

- GitHub_M: CVSS:4.0 7.1 High `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: CVSS:3.1 7.0 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H`
- GitHub: CVSS:4.0 High `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: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/gradio-app/gradio/security/advisories/GHSA-xh2x-3mrm-fwqm> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-47870> (advisory)
- <https://github.com/gradio-app/gradio> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2024-218.yaml> (web)

## Sources

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

---

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