# CVE-2024-4941: Local File Inclusion in JSON component in gradio-app/gradio

- Severity: High 7.5 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A: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.83%, higher than 58% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-06T17:55:11.754Z
- Modified: 2026-06-17T08:03:14.797Z
- Also known as: GHSA-6v6g-j5fq-hpvw, PYSEC-2024-184
- Weaknesses: CWE-20, CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: @huntr_ai

## Description

A local file inclusion vulnerability exists in the JSON component of gradio-app/gradio version 4.25. The vulnerability arises from improper input validation in the `postprocess()` function within `gradio/components/json_component.py`, where a user-controlled string is parsed as JSON. If the parsed JSON object contains a `path` key, the specified file is moved to a temporary directory, making it possible to retrieve it later via the `/file=..` endpoint. This issue is due to the `processing_utils.move_files_to_cache()` function traversing any object passed to it, looking for a dictionary with a `path` key, and then copying the specified file to a temporary directory. The vulnerability can be exploited by an attacker to read files on the remote system, posing a significant security risk.

(As written by CVE List.)

## Affected

- gradio-app gradio-app/gradio: from unspecified before 4.31.4
- gradio (PyPI): before 4.31.3; before ee1e2942e0a1ae84a08a05464e41c8108a03fa9c; before 4.31.4
- gradio_project gradio: before 4.31.4

## Every score

- @huntr_ai: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.0 7.5 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e> (exploit, evidence, third-party-advisory, web)
- <https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-4941> (advisory)
- <https://github.com/gradio-app/gradio> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2024-184.yaml> (web)
- <https://github.com/advisories/GHSA-6v6g-j5fq-hpvw> (advisory)

## Sources

- CVE List: [CVE-2024-4941](https://www.cve.org/CVERecord?id=CVE-2024-4941), CVE Terms of Use, modified 2025-10-15
- GitHub Advisory Database: [GHSA-6v6g-j5fq-hpvw](https://github.com/advisories/GHSA-6v6g-j5fq-hpvw), CC-BY-4.0, modified 2025-10-16
- NVD: [CVE-2024-4941](https://nvd.nist.gov/vuln/detail/CVE-2024-4941), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-184](https://osv.dev/vulnerability/PYSEC-2024-184), CC-BY-4.0, modified 2026-06-10

---

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