{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-4941","id":"CVE-2024-4941","title":"Local File Inclusion in JSON component in gradio-app/gradio","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 po","descriptionLong":"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.","published":"2024-06-06T17:55:11.754Z","updated":"2026-11-09T10:45:24.881388848Z","reserved":"2024-05-15T13:53:03.304Z","status":"Modified","rejected":false,"assigner":"@huntr_ai","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"OSV"},{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"@huntr_ai"},{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"huntr.dev"},{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"OSV"},{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"GitHub"}],"rating":"high","products":["gradio-app/gradio"],"affectedProducts":[{"vendor":"gradio-app","product":"gradio-app/gradio","defaultStatus":null,"versions":[{"version":"unspecified","lessThan":"4.31.4","status":"affected","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"gradio","purl":"pkg:pypi/gradio","ranges":["<4.31.3","<4.31.4"],"fixed":["4.31.3","4.31.4"],"advisory":"GHSA-6v6g-j5fq-hpvw"}],"cwes":["CWE-22","CWE-20"],"aliases":["GHSA-6v6g-j5fq-hpvw","PYSEC-2024-184"],"references":[{"url":"https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e","tags":["x_transferred","Exploit","Third Party Advisory","web","evidence"]},{"url":"https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c","tags":["x_transferred","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/4xxx/CVE-2024-4941.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-4941","tags":["advisory"]},{"url":"https://github.com/gradio-app/gradio","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2024-184.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-6v6g-j5fq-hpvw","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.0083,"epssPercentile":0.5827,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-4941","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-4941","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-4941","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-6v6g-j5fq-hpvw","ok":true,"note":"GHSA-6v6g-j5fq-hpvw"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-4941","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}