平台
python
组件
inventree
修复版本
1.2.8
CVE-2026-39362 是 InvenTree 库存管理系统中的一个服务器端请求伪造 (SSRF) 漏洞。该漏洞允许经过身份验证的用户通过提供恶意的 remote_image URL,使服务器执行未经授权的请求,可能导致访问内部资源或执行其他恶意操作。该漏洞影响 InvenTree 版本 1.2.0 到 1.2.6。该问题已在 1.2.7 版本中修复。
InvenTree 中的 CVE-2026-39362 漏洞影响 1.2.7 之前的版本和 1.3.0 版本,当启用 INVENTREEDOWNLOADFROMURL 选项时。它允许经过身份验证的用户提供远程图像 URL,这些 URL 将通过 requests.get() 在服务器端使用 Django 的 URLValidator 检查进行获取。没有对私有 IP 范围或内部主机名的验证。会跟踪重定向(allowredirects=True),从而绕过任何 URL 格式检查。这可能允许攻击者指示系统从未经授权的内部或外部来源下载恶意内容,从而可能损害系统完整性和数据机密性。
InvenTree 系统中的经过身份验证的攻击者可以利用此漏洞。通过提供恶意 URL,服务器将下载该 URL 的内容,从而可能执行恶意代码或泄露敏感信息。跟踪重定向的功能会增加风险,因为攻击者可以使用重定向来隐藏下载的最终目标。利用的复杂性取决于攻击者对系统配置的了解以及其操纵 URL 的能力。
Organizations using InvenTree for inventory management, particularly those with the INVENTREEDOWNLOADFROM_URL setting enabled, are at risk. Shared hosting environments where InvenTree is deployed alongside other applications are also vulnerable, as a compromised InvenTree instance could potentially be used to attack other services on the same server.
• python / server:
# Check for the presence of the vulnerable code in the InvenTree codebase.
grep -r 'requests.get(url, allow_redirects=True)' /path/to/inventree/source• generic web:
# Monitor access logs for requests to internal IP addresses or unusual domains originating from authenticated InvenTree users.
grep '127.0.0.1' /var/log/apache2/access.logdisclosure
漏洞利用状态
EPSS
0.04% (13% 百分位)
CISA SSVC
此漏洞的修复方法是将 InvenTree 更新到 1.2.7 或更高版本,或 1.3.0 版本。这些版本包含对下载的 URL 的额外验证,可防止访问私有 IP 地址和内部主机名。如果无法立即更新,建议禁用 INVENTREEDOWNLOADFROM_URL 选项,直到可以应用更新。此外,审查并加强网络安全策略,以限制从外部来源访问内部资源也很重要。
Actualice InvenTree a la versión 1.2.7 o superior para mitigar la vulnerabilidad de SSRF. La actualización corrige la falta de validación en las URLs de descarga de imágenes remotas, previniendo que usuarios autenticados puedan acceder a recursos internos.
漏洞分析和关键警报直接发送到您的邮箱。
InvenTree 是一个开源库存管理系统。
如果您使用的是 1.2.7 或 1.3.0 之前的 InvenTree 版本,并且启用了 INVENTREEDOWNLOADFROM_URL 选项,则您的系统容易受到攻击。
这是一个配置选项,允许 InvenTree 从用户提供的 URL 直接下载图像。
在您能够更新到安全版本之前,请禁用 INVENTREEDOWNLOADFROM_URL 选项。
审查并加强您的网络安全策略,以限制从外部来源访问内部资源。
上传你的 requirements.txt 文件,立即知道是否受影响。