漏洞信息
# 防止文件遍历攻击,保护 `/file` 安全
## 概述
Gradio 是一个开源的 Python 包,允许用户快速构建用于机器学习模型、API 或任意 Python 函数的演示或 Web 应用程序。在 4.11.0 之前的版本中,存在一个漏洞,使得攻击者可以通过 `/file` 路径访问到运行 Gradio 应用程序的机器上的任意文件。
## 影响版本
- 所有低于 4.11.0 的版本
## 细节
在受影响的版本中,**/file** 路径存在漏洞,攻击者可以进行文件遍历攻击,通过已知文件路径访问公共 URL 的 Gradio 应用程序中的任意文件。例如,如果演示是通过设置 `share=True` 创建的,或在 Hugging Face Spaces 上部署,就可能受到影响。
## 影响
攻击者可能会未经授权访问敏感文件,进而导致数据泄露等问题。此漏洞已在 4.11.0 版本中修复。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Make the `/file` secure against file traversal attacks
漏洞描述信息
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.
CVSS信息
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
漏洞类别
对路径名的限制不恰当(路径遍历)
漏洞标题
Gradio 路径遍历漏洞
漏洞描述信息
Gradio是一个开源 Python 库,是通过友好的 Web 界面演示机器学习模型的方法。 Gradio 4.11.0之前版本存在路径遍历漏洞,该漏洞源于/file存在路径遍历漏洞。
CVSS信息
N/A
漏洞类别
路径遍历