平台
python
组件
unstructured
修复版本
0.18.19
0.18.18
CVE-2025-64712 是 unstructured 库中的路径遍历漏洞。该漏洞允许攻击者通过处理包含恶意附件的 MSG 文件,在文件系统中写入或覆盖任意文件。受影响的版本包括 unstructured ≤0.9.3。建议立即升级至 0.18.18 版本以修复此安全问题。
攻击者可以精心构造包含路径遍历序列(例如 ../../../etc/cron.d/malicious)的恶意 .msg 文件。当启用 process_attachments=True 时,该库会将附件写入攻击者控制的路径,从而可能导致任意文件覆盖。更严重的是,攻击者可以通过覆盖配置文件或 cron 作业等方式实现远程代码执行。这种攻击方式的潜在影响包括系统配置篡改、恶意软件部署以及对服务器的完全控制。
目前尚无公开的漏洞利用程序 (PoC),但由于该漏洞的严重性和路径遍历漏洞的常见性,存在被利用的风险。该漏洞已于 2026-02-03 公开,建议密切关注安全社区的动态,并及时采取缓解措施。CISA 尚未将其添加到 KEV 目录。
Organizations and developers using the unstructured Python library to process email attachments, particularly those handling untrusted email sources, are at significant risk. Systems with older versions of the library (≤0.9.3) and those lacking robust input validation are especially vulnerable. Shared hosting environments where multiple applications share the same filesystem are also at increased risk.
• python / server:
import os
import hashlib
def check_attachment_filename(filename):
# Check for path traversal sequences
if "../" in filename:
print(f"Potential path traversal detected in filename: {filename}")
return True
return False
# Example usage
filename = "../../../etc/cron.d/malicious.txt"
if check_attachment_filename(filename):
print("Malicious filename detected!")disclosure
漏洞利用状态
EPSS
0.12% (32% 百分位)
CISA SSVC
CVSS 向量
最有效的缓解措施是立即将 unstructured 库升级至 0.18.18 或更高版本。如果升级会导致系统中断,可以考虑临时回滚到之前的稳定版本,并尽快安排升级。此外,可以配置 Web 应用防火墙 (WAF) 或代理服务器,以阻止包含可疑路径遍历序列的 MSG 文件上传。 监控系统日志,查找异常文件写入行为,有助于及早发现潜在攻击。
升级 `unstructured` 库到 0.18.18 或更高版本。这修复了处理恶意 MSG 文件时的路径遍历漏洞。运行 `pip install --upgrade unstructured` 进行升级。
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2025-64712 是 unstructured 库中的一个路径遍历漏洞,允许攻击者通过恶意 MSG 文件覆盖文件系统上的任意文件,可能导致远程代码执行。
如果您正在使用 unstructured 版本 ≤0.9.3,则可能受到影响。请立即升级至 0.18.18 或更高版本。
升级至 unstructured 0.18.18 或更高版本是修复此漏洞的最佳方法。如果升级导致问题,请考虑临时回滚并尽快升级。
目前尚未确认 CVE-2025-64712 正在被积极利用,但由于漏洞的严重性,存在被利用的风险。
请查阅 unstructured 官方安全公告或 GitHub 仓库,以获取有关 CVE-2025-64712 的最新信息。
上传你的 requirements.txt 文件,立即知道是否受影响。