{"id":"CVE-2024-4941","state":"PUBLISHED","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 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.","publishedAt":"2024-06-06T17:55:11.754Z","updatedAt":"2025-10-15T12:49:40.335Z","severity":{"score":7.5,"label":"High","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["gradio-app gradio-app/gradio"],"affected":[{"vendor":"gradio-app","product":"gradio-app/gradio","versions":[{"version":"unspecified","status":"affected","lessThan":"4.31.4","versionType":"custom"}]}],"references":["https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e","https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c"],"weaknesses":["CWE-22"],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/4xxx/CVE-2024-4941.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-4941","state":"PUBLISHED","datePublished":"2024-06-06T17:55:11.754Z","dateUpdated":"2025-10-15T12:49:40.335Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2024-05-15T13:53:03.304Z"},"containers":{"cna":{"title":"Local File Inclusion in JSON component in gradio-app/gradio","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"gradio-app","product":"gradio-app/gradio","versions":[{"version":"unspecified","status":"affected","lessThan":"4.31.4","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e"},{"url":"https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","baseScore":7.5,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","type":"CWE","lang":"en","description":"CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2025-10-15T12:49:40.335Z"},"source":{"advisory":"39889ce1-298d-4568-aecd-7ae40c2ca58e","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-03-20T18:13:53.877871Z","id":"CVE-2024-4941","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-03-20T18:14:11.058Z"}},{"title":"CVE Program Container","references":[{"url":"https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e","tags":["x_transferred"]},{"url":"https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T20:55:10.306Z"}}]}}}