Skip to content
SSRF Disclosed report Intermediate CVE-2026-4035

MLflow: Environment variable injection in AI Gateway secrets enables server-side credential exfiltration

The AI Gateway secrets feature resolved environment variable references in the api_key field against the MLflow server's own environment, then sent the resolved value in authentication headers to a user-configured upstream endpoint. A low-privileged or unauthenticated user could therefore direct server-side credentials such as cloud access keys to an attacker-controlled host.

mlflow/mlflow

Originally disclosed on huntr

Critical View original

A vulnerability in mlflow/mlflow versions prior to 3.11.0 allows for the resolution of environment variables in AI Gateway secrets, which can be exploited to exfiltrate sensitive server-side environment credentials to an attacker-controlled endpoint. This issue arises because the api_key field in gateway secrets can accept $ENV_VAR references, which are resolved against the MLflow server's environment during runtime. The resolved secrets are then sent in provider authentication headers to the configured upstream api_base. This vulnerability can be exploited by low-privileged authenticated users in basic-auth deployments or by unauthenticated users in default deployments without basic-auth. The impact includes potential leakage of sensitive credentials such as cloud artifact credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY), which could lead to artifact poisoning and cross-boundary code execution in downstream environments. The issue is fixed in version 3.11.0.

From the GitHub Advisory Database (GHSA-g35p-px32-whv6, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

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 secret-handling code expanded environment variable references in user-supplied api_key values without restricting which variables could be read or where the resolved value could be sent.

Impact

Sensitive server-side credentials such as cloud artifact keys could be leaked, potentially leading to artifact poisoning and cross-boundary code execution in downstream environments; exploitation required either a low-privileged account in basic-auth deployments or no authentication at all in default deployments.

What the attacker needed

MLflow before 3.11.0; basic-auth: any low-privileged account; default deployment: no authentication needed; attacker controls an upstream api_base endpoint

The fix

The issue was fixed in version 3.11.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 projects, and its AI Gateway lets users configure connections to AI providers using a secret key. The bug meant that if a user typed a placeholder like an environment variable name into that key field, the server replaced it with the real value from its own operating-system settings. Because the user also chose where the request went, the server could be tricked into sending its own private credentials to someone else.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More from mlflow/mlflow

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.