{"cve":"CVE-2024-47164","nvd":{"published":"2024-10-10T22:15:10.437","modified":"2026-06-17T07:56:39.283","status":"Analyzed","description":"Gradio is an open-source Python package designed for quick prototyping. This vulnerability relates to the **bypass of directory traversal checks** within the `is_in_or_equal` function. This function, intended to check if a file resides within a given directory, can be bypassed with certain payloads that manipulate file paths using `..` (parent directory) sequences. Attackers could potentially access restricted files if they are able to exploit this flaw, although the difficulty is high. This primarily impacts users relying on Gradio’s blocklist or directory access validation, particularly when handling file uploads. Users are advised to upgrade to `gradio>=5.0` to address this issue. As a workaround, users can manually sanitize and normalize file paths in their Gradio deployment before passing them to the `is_in_or_equal` function. Ensuring that all file paths are properly resolved and absolute can help mitigate the bypass vulnerabilities caused by the improper handling of `..` sequences or malformed paths.","cvss_v4":{"vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":2.3},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5},"cwes":["CWE-22"],"references":["https://github.com/gradio-app/gradio/security/advisories/GHSA-77xq-6g77-h274"],"products":["gradio_project:gradio"],"source":"nvd","synced_at":"2026-10-19T21:55:31.737901711+00:00"},"epss":{"cve":"CVE-2024-47164","score":0.00705,"percentile":0.53376,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-77xq-6g77-h274","url":"https://osv.dev/vulnerability/GHSA-77xq-6g77-h274","summary":"Gradio's `is_in_or_equal` function may be bypassed","modified":"2025-01-21T18:21:41.142630Z","packages":[{"ecosystem":"PyPI","name":"gradio","purl":"pkg:pypi/gradio","ranges":["<5.0.0"],"fixed":["5.0.0"]}]},{"id":"PYSEC-2024-213","url":"https://osv.dev/vulnerability/PYSEC-2024-213","summary":"","modified":"2025-01-19T22:56:51.678860Z","packages":[{"ecosystem":"PyPI","name":"gradio","purl":"pkg:pypi/gradio","ranges":["<5.0.0"],"fixed":["5.0.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}