漏洞信息
# 通过 gradio-app/gradio 组件方法调用读取任意本地文件
## 漏洞概述
在 gradio-app/gradio 中发现了一个漏洞,攻击者可以通过 `/component_server` 端点调用 `Component` 类的任何方法,并使用受攻击者控制的参数。具体来说,通过利用 `Block` 类中的 `move_resource_to_block_cache()` 方法,攻击者可以将文件系统中的任何文件复制到临时目录并随后获取这些文件。
## 影响版本
未指定具体版本
## 漏洞细节
1. 攻击者可以利用 `/component_server` 端点来调用 `Component` 类的方法。
2. 利用 `Block` 类中的 `move_resource_to_block_cache()` 方法,攻击者可以将任意文件复制到临时目录,并读取这些文件。
3. 该漏洞导致未经授权的本地文件读取访问,当应用程序通过 `launch(share=True)` 暴露到互联网时,远程攻击者可以读取主机上的文件。
4. 在 `huggingface.co` 上托管的 Gradio 应用程序也会受到影响,可能导致敏感信息如 API 密钥和凭据的暴露。
## 影响
- 未经授权的本地文件读取,特别是当应用程序公开在互联网上时。
- 暴露托管在 `huggingface.co` 上的应用程序中的敏感信息,如 API 密钥和环境变量中的凭证。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Arbitrary Local File Read via Component Method Invocation in gradio-app/gradio
漏洞描述信息
An issue was discovered in gradio-app/gradio, where the `/component_server` endpoint improperly allows the invocation of any method on a `Component` class with attacker-controlled arguments. Specifically, by exploiting the `move_resource_to_block_cache()` method of the `Block` class, an attacker can copy any file on the filesystem to a temporary directory and subsequently retrieve it. This vulnerability enables unauthorized local file read access, posing a significant risk especially when the application is exposed to the internet via `launch(share=True)`, thereby allowing remote attackers to read files on the host machine. Furthermore, gradio apps hosted on `huggingface.co` are also affected, potentially leading to the exposure of sensitive information such as API keys and credentials stored in environment variables.
CVSS信息
N/A
漏洞类别
路径遍历:’..filename’
漏洞标题
Gradio 安全漏洞
漏洞描述信息
Gradio是一个开源 Python 库,是通过友好的 Web 界面演示机器学习模型的方法。 Gradio 存在安全漏洞,该漏洞源于端点不正确地允许调用类上的任何方法,允许未经授权的本地文件读取访问,可能导致敏感信息泄露。
CVSS信息
N/A
漏洞类别
其他