{"id":"CVE-2023-51449","published":"2023-12-22T20:58:36Z","modified":"2024-08-02T22:32:09Z","title":"Make the `/file` secure against file traversal attacks","vendor":"gradio-app","product":"gradio","tier":"tail","description":{"text":"Gradio is an open-source Python package that allows you to quickly build a demo or web application for your machine learning model, API, or any arbitary Python function. Versions of `gradio` prior to 4.11.0 contained a vulnerability in the `/file` route which made them susceptible to file traversal attacks in which an attacker could access arbitrary files on a machine running a Gradio app with a public URL (e.g. if the demo was created with `share=True`, or on Hugging Face Spaces) if they knew the path of files to look for. This issue has been patched in version 4.11.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.6,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.28336,"percentile":0.98119,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/gradio-app/gradio/security/advisories/GHSA-6qm2-wpxq-7qh2","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/gradio-app/gradio/commit/1b9d4234d6c25ef250d882c7b90e1f4039ed2d76","tags":["x_refsource_MISC"]},{"url":"https://github.com/gradio-app/gradio/commit/7ba8c5da45b004edd12c0460be9222f5b5f5f055","tags":["x_refsource_MISC"]}],"priority":{"score":28.5,"factors":[{"name":"EPSS percentile","points":19.62},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.92}]},"exploitSources":{"nuclei":[{"id":"CVE-2023-51449","name":"Gradio Hugging Face - Local File Inclusion","severity":"high","path":"http/cves/2023/CVE-2023-51449.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-51449.yaml"}],"provenance":"source"},"vendorSlug":"gradio-app","affectedVersions":[{"vendor":"gradio-app","product":"gradio","versions":["< 4.11.0"]}],"affected":[{"ecosystem":"PyPI","package":"gradio","vulnerableRanges":["<4.11.0"],"patched":["4.11.0"],"from":["GHSA-6qm2-wpxq-7qh2","PYSEC-2023-249"],"provenance":"source"}],"euvd":{"id":"EUVD-2023-0089","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-gradio-app-gradio-cve-2023-34239","parents":[{"from":"CVE-2023-34239","to":"CVE-2023-51449","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["gradio/routes.py","gradio/utils.py"],"commits":["https://github.com/gradio-app/gradio/commit/37967617bd97615fb6f3b44e7750c0e0be58479a","https://github.com/gradio-app/gradio/commit/cd64130d54e678525774bbb200ef9c7166fa1543","https://github.com/gradio-app/gradio/commit/1b9d4234d6c25ef250d882c7b90e1f4039ed2d76","https://github.com/gradio-app/gradio/commit/7ba8c5da45b004edd12c0460be9222f5b5f5f055"],"basis":"shared function","functions":["is_in_or_equal"]}]}],"packageHistory":[{"cve":"CVE-2023-34239","published":"2023-06-07","fixed":"3.34.0","kev":false},{"cve":"CVE-2024-0964","published":"2024-02-05","fixed":"4.9.0","kev":false},{"cve":"CVE-2024-1183","published":"2024-04-16","fixed":"4.10.0","kev":false},{"cve":"CVE-2023-51449","published":"2023-12-22","fixed":"4.11.0","kev":false},{"cve":"CVE-2024-1561","published":"2024-04-16","fixed":"4.13.0","kev":false,"link":{"from":"CVE-2023-51449","to":"CVE-2024-1561","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:gradio","fromFixed":"4.11.0","toFixed":"4.13.0","daysApart":116},{"kind":"same-code","provenance":"machine","files":["gradio/routes.py"],"commits":["https://github.com/gradio-app/gradio/commit/1b9d4234d6c25ef250d882c7b90e1f4039ed2d76","https://github.com/gradio-app/gradio/commit/7ba8c5da45b004edd12c0460be9222f5b5f5f055","https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2"],"basis":"shared file"}]}},{"cve":"CVE-2023-6572","published":"2023-12-14","fixed":"4.14.0","kev":false},{"cve":"CVE-2024-2206","published":"2024-03-27","fixed":"4.18.0","kev":false}],"package":"PyPI:gradio"}}