MLflow: Environment variable injection in AI Gateway secrets enables server-side credential exfiltration
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.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| mlflow PyPI | < 3.11.0 | 3.11.0 |
Details and references
- CVSS 3.0
- CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-201
- Also known as
- BIT-mlflow-2026-4035, CVE-2026-4035, PYSEC-2026-2222
- nvd.nist.gov/vuln/detail/CVE-2026-4035
- github.com/mlflow/mlflow/commit/4a3f2f720cb4f058c9e0c5b883e0acc9ab64a7f3
- access.redhat.com/security/cve/CVE-2026-4035
- bugzilla.redhat.com/show_bug.cgi?id=2484318
- github.com/mlflow/mlflow
- huntr.com/bounties/f8e591a0-0f19-4910-b82e-16c9956f2233
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-4035.json