MLflow: unauthenticated access to certain FastAPI routes
When MLflow is run with basic authentication enabled and served via uvicorn, the FastAPI permission middleware only checks authentication for /gateway/ routes. An unauthenticated attacker can therefore reach other FastAPI routes such as the Job API and the OpenTelemetry trace ingestion API, allowing them to submit, read and cancel jobs and to inject arbitrary trace data.
mlflow/mlflow
Originally disclosed on huntr
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.
From the GitHub Advisory Database (GHSA-75cm-x2w3-8mgf, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the FastAPI permission middleware only looks up a validator for paths beginning with /gateway/, so any other FastAPI route is treated as unauthenticated and allowed through.
Impact
An unauthenticated remote attacker could submit jobs, read job results, cancel running jobs and inject arbitrary trace data into experiments.
What the attacker needed
Server started with --app-name basic-auth; server served via uvicorn (ASGI); network access to the MLflow server
The fix
It was fixed in version 3.10.0.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
MLflow is a tool for managing machine-learning experiments. When you turn on its login feature, some newer parts of the web server forgot to check whether you are logged in. That means anyone who can reach the server can use those parts without a password.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.