Summary
MLflow instances using hard-coded default credentials in basic_auth.ini are vulnerable to authentication bypass, allowing remote attackers to gain administrator-level access.
Because the default password is known and static, an attacker can log in without prior authentication and ultimately execute arbitrary code in the administrator's context.
Affected context
This vulnerability occurs in MLflow deployments that enable authentication using the basic_auth.ini mechanism and retain the shipped or documented default credentials.
It is most relevant in environments where MLflow is exposed over a network and where administrators have not enforced unique, secret credentials or additional access controls.
The risk increases significantly when MLflow is reachable from untrusted networks, such as the public internet or large internal segments, and is used to manage models, experiments, or automation with elevated privileges.
Exploit preconditions
- Attack surface: Network-accessible MLflow UI or API endpoints protected by basic authentication.
- Required access: Ability to connect to the MLflow service over the network; no prior authentication or special privileges are required.
- Trigger point: Use of known hard-coded default username and password defined in
basic_auth.iniduring the login process. - Why exploitation is possible: The authentication layer trusts static, hard-coded credentials that are not unique to a particular deployment, allowing any attacker with knowledge of those defaults to successfully authenticate as an administrator.
Why this happens
The underlying issue aligns with CWE-798: Use of Hard-coded Credentials and CWE-1393: Use of Default Password, where authentication logic relies on a known, static secret embedded in configuration.
Instead of requiring operators to provision unique, high-entropy credentials or integrating with a secure identity provider, the system ships or operates with default administrator credentials stored in basic_auth.ini.
From an abstract perspective, the bug class is the use of predictable or shared secrets as a primary authentication factor, meaning that access control effectively collapses once those defaults become known outside the trusted boundary.
Potential impact
- Remote attackers may authenticate as the MLflow administrator and gain full control over the MLflow instance.
- Attackers could create, modify, or delete ML models, experiments, and related artifacts.
- Arbitrary code execution can occur through features that run user-defined code, scripts, or workflows under administrator control.
- Compromise of connected infrastructure, such as training clusters, storage backends, or CI/CD pipelines, via malicious MLflow configurations.
- Data exposure or corruption, including training datasets, model outputs, and sensitive experiment metadata.
General mitigation guidance
Mitigation generally focuses on eliminating shared or default credentials and strengthening authentication boundaries.
Recommended patterns include:
- Replacing any shipped or documented default credentials with unique, high-entropy secrets during initial deployment, and enforcing rotation policies.
- Avoiding hard-coded credentials in configuration files and instead using secure secret management (environment variables, secrets managers, or identity providers).
- Integrating MLflow authentication with centralized identity and access management (e.g., SSO, OAuth2, or corporate IdP) rather than basic auth files.
- Applying network-layer controls and least privilege principles to restrict who can reach MLflow services.
- Configuring role-based access control where possible, separating administrative capabilities from routine user actions.
How teams detect issues like this
High-level detection approaches include:
- Reviewing deployment and configuration artifacts for the presence of default or hard-coded credentials in
basic_auth.inior similar files. - Using configuration and secrets scanning tools to identify predictable usernames and passwords in repositories and infrastructure-as-code.
- Implementing policy checks in CI/CD pipelines that block usage of known default credentials or credential patterns.
- Monitoring authentication logs for repeated successful logins using well-known default accounts or unusual access patterns from untrusted networks.
- Periodic manual or automated security reviews of MLflow instances to confirm that administrator accounts use strong, unique credentials and that no default settings remain.

