# CVE-2024-47164: The `is_in_or_equal` function may be bypassed in Gradio

- Severity: Low 2.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.70%, higher than 54% of CVEs (2026-12-01)
- Published: 2024-10-10T21:27:47.000Z
- Modified: 2026-06-17T07:56:39.283Z
- Also known as: GHSA-77xq-6g77-h274, PYSEC-2024-213
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- gradio-app gradio: < 5.0
- gradio (PyPI): before 5.0.0
- gradio_project gradio: before 5.0.0

## Every score

- GitHub_M: CVSS:4.0 2.3 Low `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`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/gradio-app/gradio/security/advisories/GHSA-77xq-6g77-h274> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-47164> (advisory)
- <https://github.com/gradio-app/gradio/commit/08b51590163b306fd874f543f6fcaf23ac7d2646> (web)
- <https://github.com/gradio-app/gradio> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2024-213.yaml> (web)

## Sources

- CVE List: [CVE-2024-47164](https://www.cve.org/CVERecord?id=CVE-2024-47164), CVE Terms of Use, modified 2024-10-11
- GitHub Advisory Database: [GHSA-77xq-6g77-h274](https://github.com/advisories/GHSA-77xq-6g77-h274), CC-BY-4.0, modified 2025-01-21
- NVD: [CVE-2024-47164](https://nvd.nist.gov/vuln/detail/CVE-2024-47164), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-213](https://osv.dev/vulnerability/PYSEC-2024-213), CC-BY-4.0, modified 2025-01-19

---

Page: https://cve.day/CVE-2024-47164 · Whole record: https://cve.day/CVE-2024-47164.json · Rebuilt by cve.day 2026-11-25T22:58:46.635Z
