CVE-2024-7776是一个路径遍历漏洞,影响到onnx框架的版本小于等于1.9.0。该漏洞源于download_model函数中对恶意tar文件路径遍历攻击的预防不足,攻击者可以利用此漏洞覆盖用户目录中的文件。升级到1.17.0版本可以解决此问题。
该路径遍历漏洞允许攻击者通过构造恶意的tar文件,绕过安全检查,将文件覆盖到用户目录。攻击者可以利用此漏洞覆盖关键配置文件、可执行文件或其他敏感数据,从而可能导致远程命令执行。如果成功覆盖了具有执行权限的文件,攻击者可以完全控制受影响的系统。这种攻击模式类似于其他文件上传漏洞,但利用了tar文件的特性进行路径遍历。
该漏洞已于2025年3月20日公开披露。目前尚未观察到大规模的利用活动,但由于该漏洞的严重性和易于利用性,存在被利用的风险。该漏洞尚未被添加到CISA KEV目录,但其潜在影响值得关注。建议密切关注安全社区的动态,并及时采取缓解措施。
Python developers and systems administrators using the onnx framework in their applications are at risk. This includes those deploying machine learning models or applications that rely on the onnx format. Shared hosting environments where multiple users share the same file system are particularly vulnerable, as a malicious tar file uploaded by one user could potentially impact others.
• python / supply-chain:
import os
import tarfile
def check_onnx_vulnerability(tar_file_path):
try:
with tarfile.open(tar_file_path, 'r') as tar:
for member in tar.getmembers():
if '../' in member.name:
print(f"Potential path traversal detected in: {member.name}")
return True
except Exception as e:
print(f"Error processing tar file: {e}")
return False
# Example usage:
# Replace with the path to a potentially malicious tar file
tar_file = 'malicious.tar.gz'
if check_onnx_vulnerability(tar_file):
print("Vulnerability likely present.")
else:
print("No immediate path traversal detected.")• generic web: Check for unusual file downloads or modifications in web server access logs, especially those related to model downloads.
disclosure
漏洞利用状态
EPSS
1.47% (81% 百分位)
CISA SSVC
CVSS 向量
最有效的缓解措施是立即升级到onnx框架1.17.0或更高版本。如果无法立即升级,可以考虑使用Web应用防火墙(WAF)来过滤恶意tar文件上传请求,并限制用户目录的写入权限。此外,可以实施严格的文件类型验证和路径清理措施,以防止攻击者绕过安全检查。在升级后,请验证文件权限和配置是否正确,确保没有被恶意覆盖。
Actualice la biblioteca onnx a una versión posterior a la 1.16.1. Esto se puede hacer usando el gestor de paquetes pip: `pip install --upgrade onnx`. Asegúrese de verificar que la actualización se haya realizado correctamente y que la versión instalada sea la correcta.
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2024-7776是一个路径遍历漏洞,影响到onnx框架的版本小于等于1.9.0。攻击者可以通过恶意tar文件覆盖用户目录中的文件,可能导致远程命令执行。
如果您正在使用onnx框架的版本小于等于1.9.0,那么您可能受到此漏洞的影响。请立即升级到1.17.0或更高版本。
最有效的修复方法是升级到onnx框架1.17.0或更高版本。如果无法立即升级,请考虑使用WAF和实施严格的文件类型验证和路径清理措施。
目前尚未观察到大规模的利用活动,但由于该漏洞的严重性和易于利用性,存在被利用的风险。
请访问onnx官方网站或GitHub仓库,查找关于CVE-2024-7776的公告和安全更新。
上传你的 requirements.txt 文件,立即知道是否受影响。