Junglewise Threat Intelligence

CVE-2024-0964: Gradio path traversal in API request handling

CVE-2024-0964 · Severity: high · CVSS 7.5 · Published 2024-02-06

Technologies: gradio (PyPI). Vendors: PyPI.

Executive brief

Gradio, a popular Python library used to build web interfaces for machine learning models, is vulnerable to a security flaw that allows unauthorized access to files on the host server. By sending a specially crafted request to the application's API, an attacker can bypass directory restrictions to read sensitive system files. This could lead to the exposure of private data, configuration files, or credentials stored on the server.

Technical details

A path traversal vulnerability (CWE-22) exists in Gradio versions prior to 4.9.0. The flaw is rooted in improper validation of user-supplied JSON values within API requests, which are subsequently used to construct file paths. A remote, unauthenticated attacker can exploit this by submitting crafted path sequences (e.g., dot-dot-slash) to trigger a local file inclusion (LFI) and read sensitive files from the underlying filesystem. The vulnerability is reachable over the network with low complexity and requires no user interaction. The issue was addressed in version 4.9.0.

Affected products

  • gradio-app gradio < 4.9.0

Timeline

  • 2024-02-05: disclosed: NVD publication date
  • 2024-02-06: advisory: GitHub Advisory published
  • 2023-12-12: patched: Fix commit merged into repository

References

Related threats