Skip to content
HighVulnerability

CVE-2024-4941: Gradio JSON component local file inclusion via postprocess

Identifier
CVE-2024-4941
Published
Record updated
View JSON
Affected
  • gradio < 4.31.3
Fixed in
4.31.3
  • released May 15, 2024, 22 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.8%

Summary

CVE-2024-4941 is a local file inclusion flaw in the JSON component of gradio-app/gradio version 4.25. The postprocess() function in gradio/components/json_component.py parses a user-controlled string as JSON, and if the object contains a path key, processing_utils.move_files_to_cache() copies the named file to a temporary directory. An attacker can then retrieve that file through the /file=.. endpoint, reading files on the remote system.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.