From 3d29e133fcbfd5c467bb69c6c492feda8ba0d830 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:28:53 +0000 Subject: [PATCH] Publish GHSA-77xq-6g77-h274 --- .../GHSA-77xq-6g77-h274.json | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 advisories/github-reviewed/2024/10/GHSA-77xq-6g77-h274/GHSA-77xq-6g77-h274.json diff --git a/advisories/github-reviewed/2024/10/GHSA-77xq-6g77-h274/GHSA-77xq-6g77-h274.json b/advisories/github-reviewed/2024/10/GHSA-77xq-6g77-h274/GHSA-77xq-6g77-h274.json new file mode 100644 index 00000000000..7466499be87 --- /dev/null +++ b/advisories/github-reviewed/2024/10/GHSA-77xq-6g77-h274/GHSA-77xq-6g77-h274.json @@ -0,0 +1,65 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-77xq-6g77-h274", + "modified": "2024-10-10T21:27:47Z", + "published": "2024-10-10T21:27:47Z", + "aliases": [ + "CVE-2024-47164" + ], + "summary": "Gradio's `is_in_or_equal` function may be bypassed", + "details": "### Impact\n**What kind of vulnerability is it? Who is impacted?**\n\nThis 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.\n\n### Patches\nYes, please upgrade to `gradio>=5.0` to address this issue.\n\n### Workarounds\n**Is there a way for users to fix or remediate the vulnerability without upgrading?**\n\nAs 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.", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" + }, + { + "type": "CVSS_V4", + "score": "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" + } + ], + "affected": [ + { + "package": { + "ecosystem": "PyPI", + "name": "gradio" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "5.0.0" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/gradio-app/gradio/security/advisories/GHSA-77xq-6g77-h274" + }, + { + "type": "WEB", + "url": "https://github.com/gradio-app/gradio/commit/08b51590163b306fd874f543f6fcaf23ac7d2646" + }, + { + "type": "PACKAGE", + "url": "https://github.com/gradio-app/gradio" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-22" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2024-10-10T21:27:47Z", + "nvd_published_at": null + } +} \ No newline at end of file