CVE-2024-5182 是 localai 中发现的一处路径遍历漏洞。攻击者可以通过操纵模型删除过程中的 model 参数,删除文件系统中的任意文件,造成严重的数据泄露风险。该漏洞影响 localai 版本小于或等于 2.16.0 的用户。建议立即升级至 2.16.0 版本以消除此安全隐患。
该路径遍历漏洞允许攻击者绕过安全机制,访问并删除文件系统中的敏感数据。攻击者可以通过精心构造的请求,利用 model 参数的缺陷,遍历目录结构,并删除任意文件,包括配置文件、数据库备份或其他包含敏感信息的文档。如果攻击者能够成功删除关键系统文件,可能导致服务中断或完全瘫痪。由于 localai 经常用于部署 AI 模型,因此该漏洞可能导致模型数据泄露或被篡改,进而影响 AI 应用的安全性。
目前尚未公开发现针对 CVE-2024-5182 的公开利用代码。该漏洞已添加到 CISA KEV 目录中,表明其具有中等概率被利用。建议密切关注安全社区的动态,并及时采取缓解措施。NVD 发布日期为 2024-06-19,表明该漏洞已公开披露。
Organizations deploying localai in production environments, particularly those using older versions (≤2.16.0), are at risk. Shared hosting environments where multiple users share the same localai instance are also vulnerable, as an attacker could potentially exploit the vulnerability to delete files belonging to other users. Users relying on localai for critical data processing or storage should prioritize patching.
• docker: Inspect running containers for localai versions prior to 2.16.0 using docker ps and docker exec -it <container_id> localai --version.
• file system: Monitor file system activity for unexpected file deletions, particularly in directories containing sensitive data. Use tools like inotifywait (Linux) or file integrity monitoring solutions.
• network: Monitor network traffic for suspicious requests targeting the model deletion endpoint with unusual or manipulated parameters. Use tools like Wireshark or tcpdump.
• logs: Examine localai application logs for error messages or warnings related to file access or deletion attempts.
disclosure
漏洞利用状态
EPSS
2.49% (85% 百分位)
CISA SSVC
CVSS 向量
最有效的缓解措施是立即将 localai 升级至 2.16.0 或更高版本。如果升级不可行,可以考虑以下临时缓解措施:首先,限制对模型删除功能的访问,仅允许授权用户执行此操作。其次,实施严格的文件访问控制,确保用户只能访问其授权访问的文件。第三,监控文件系统活动,检测任何异常的文件删除操作。最后,在 Docker 环境中,可以考虑使用只读卷来存储关键数据,以防止被意外删除。升级后,请验证模型删除功能是否正常工作,并确认文件系统权限已正确配置。
Actualice a la versión 2.16.0 o posterior de mudler/localai. Esta versión corrige la vulnerabilidad de path traversal. La actualización se puede realizar descargando la nueva imagen de Docker o actualizando el código fuente y reconstruyendo la aplicación.
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2024-5182 是 localai 版本 ≤2.16.0 中发现的一处路径遍历漏洞,攻击者可利用模型删除功能删除任意文件。
如果您正在使用 localai 版本小于或等于 2.16.0,则可能受到此漏洞的影响。请立即升级至最新版本。
最有效的修复方法是升级至 localai 2.16.0 或更高版本。如果无法升级,请参考缓解措施,如限制访问和实施文件访问控制。
目前尚未公开发现针对 CVE-2024-5182 的公开利用代码,但已添加到 CISA KEV 目录,表明其具有中等概率被利用。
请访问 localai 的官方网站或 GitHub 仓库,查找关于 CVE-2024-5182 的安全公告。
上传你的 Dockerfile 文件,立即知道是否受影响。