Junglewise Threat Intelligence

CVE-2024-47166: PYSEC-2024-197 - Gradio is an open-source Python package designed for quick prototyping. This vulnerability involves a **one-level read path traversal** in t

CVE-2024-47166 · Severity: low · CVSS 3.1 · Published 2024-10-10

Technologies: gradio (PyPI). Vendors: PyPI.

Executive brief

Gradio is a popular Python framework for building machine learning interfaces. A path traversal flaw in the /custom_component endpoint allows attackers to read source code files from custom components by manipulating file paths in requests. Although limited to a single directory level, the vulnerability could expose proprietary code or sensitive logic that developers intended to keep private.

Technical details

The vulnerability is a path traversal (CWE-22) in the /custom_component endpoint of Gradio. Attackers can exploit insufficient path validation to traverse up one directory level and read arbitrary files within the scope of the component directory. The attack requires network access to a publicly exposed Gradio instance and no authentication, making it remotely exploitable. Successful exploitation allows an attacker to leak source code from custom components. The flaw is fixed in Gradio version 4.44 and later.

Affected products

  • Gradio Gradio before 4.44

Timeline

  • 2024-10-10: disclosed
  • 2024-10-10: patched: patched in version 4.44

References

Related threats