CVE-2024-1728 是 Gradio 应用中的任意文件访问漏洞。攻击者可以通过拦截和修改 Gradio 应用发送到服务器的网络请求来访问主机上的文件。此漏洞影响 Gradio 版本小于或等于 4.9.1 的应用。建议用户尽快升级到 Gradio 4.19.2 或更高版本以修复此问题。
该漏洞的潜在影响非常严重,尤其是在 Gradio 应用通过公共链接(例如 Hugging Face Spaces)部署的情况下。攻击者可以利用此漏洞访问服务器上的敏感文件,包括源代码、配置文件、数据库凭据等。这可能导致数据泄露、系统入侵,甚至完全控制服务器。攻击者可以通过精心构造的网络请求来绕过安全措施,从而访问未经授权的文件。虽然目前尚未观察到该漏洞被实际利用,但考虑到其严重性,及时修复至关重要。
该漏洞已于 2024 年 9 月 25 日公开披露。目前尚未观察到该漏洞被大规模利用,但由于其影响的严重性,建议尽快采取缓解措施。该漏洞没有被添加到 CISA KEV 目录中。公开的 PoC 存在,表明攻击者可以利用此漏洞。
Organizations and individuals deploying Gradio applications with public links, particularly those hosted on platforms like Hugging Face Spaces, are at risk. This includes machine learning engineers, data scientists, and developers who rely on Gradio for building and sharing interactive model demos. Legacy Gradio deployments and those with overly permissive file system permissions are particularly vulnerable.
• python / gradio: Monitor Gradio application logs for unusual file access attempts.
import logging
logging.basicConfig(filename='gradio_app.log', level=logging.INFO)
# ... your Gradio app code ...• generic web: Inspect access logs for requests targeting unusual file paths within the Gradio application directory.
• generic web: Check response headers for unexpected file content types or sizes.
• generic web: Use curl to attempt accessing files outside the intended application directory (e.g., /../../etc/passwd).
curl 'http://your-gradio-app.com/../../etc/passwd'disclosure
漏洞利用状态
EPSS
87.95% (99% 百分位)
CISA SSVC
CVSS 向量
最有效的缓解措施是升级到 Gradio 4.19.2 或更高版本,该版本修复了此漏洞。如果无法立即升级,可以考虑以下临时缓解措施:限制 Gradio 应用的网络访问权限,只允许访问必要的文件和资源;实施严格的网络监控,检测异常的网络请求;使用 Web 应用防火墙 (WAF) 过滤恶意请求。升级后,请验证 Gradio 应用是否正常运行,并检查服务器上的文件是否受到未经授权的访问。
Actualice la biblioteca gradio a la versión 4.19.2 o superior. Esto corregirá la vulnerabilidad de inclusión de archivos locales. Puede actualizar usando `pip install --upgrade gradio`.
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2024-1728 是 Gradio 应用中的一个漏洞,允许攻击者通过修改网络请求访问服务器上的文件。CVSS 评分为 8.1 (高)。
如果您正在使用 Gradio 版本小于或等于 4.9.1,则可能受到此漏洞的影响。请立即升级到 4.19.2 或更高版本。
升级到 Gradio 4.19.2 或更高版本是修复此漏洞的最佳方法。
虽然目前尚未观察到大规模利用,但由于其严重性,建议尽快采取缓解措施。
请访问 Gradio GitHub 仓库:https://github.com/gradio-app/gradio/commit/16fbe9cd0cffa9f2a824a01
上传你的 requirements.txt 文件,立即知道是否受影响。