CVE-2026-0596: Mlflow Command Injection When Serving Models Vulnerability

CRITICAL
Advisory Identifier: GHSA-rvhj-8chj-8v3c
CVSS 9.6
CWE-78
Published
Advisory Summary

CVE-2026-0596 is a CRITICAL (CVSS 9.6) command injection when serving models vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Mlflow libraries in the PyPI ecosystem. The issue involves command injection when serving models with enable_mlserver=true. Remediation is available by upgrading affected packages to version 3.9.0.

CVE-2026-0596 at a Glance

CVE Identifier CVE-2026-0596
GHSA Identifier GHSA-rvhj-8chj-8v3c
Severity CRITICAL
CVSS v3.1 Base Score 9.6
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Mlflow
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-0596

To remediate this vulnerability, upgrade all affected Mlflow dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mlflow fixed: 3.9.0
pip install mlflow>=3.9.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mlflow

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-0596, inspect your installed packages using pip:

pip show mlflow

Analyze the terminal output to locate any version of Mlflow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.9.0), your application is affected.

Note: The pip show mlflow command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Mlflow, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A command injection vulnerability exists in Mlflow when serving a model with `enable_mlserver=True`. The `model_uri` is embedded directly into a shell command executed via `bash -c` without proper sanitization. If the `model_uri` contains shell metacharacters, such as `$()` or backticks, it allows for command substitution and execution of attacker-controlled commands. This vulnerability affects the latest version of mlflow/mlflow and can lead to privilege escalation if a higher-privileged service serves models from a directory writable by lower-privileged users.

CVE-2026-0596 Affected Mlflow Versions

1 component(s)
Fixed Versions:
3.9.0
Product / Package Ecosystem Affected Versions Fixed Version
mlflow
PyPI
< 3.9.0
3.9.0

References

Frequently Asked Questions

What is CVE-2026-0596?
CVE-2026-0596 is a security vulnerability in Mlflow involving Command Injection when serving models with enable_mlserver=True under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Mlflow versions are affected?
Affected versions include releases prior to 3.9.0 across affected packages: mlflow.
What version fixes CVE-2026-0596?
Upgrading to 3.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mlflow affected?
Yes, mlflow is affected in releases prior to 3.9.0. Upgrade your dependency to 3.9.0 or later.
What is the CVSS score of CVE-2026-0596?
CVE-2026-0596 has a CVSS v3.1 base score of 9.6 (CRITICAL) with vector string CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-0596?
CVE-2026-0596 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2026-0596?
Run the dependency tree command: 'pip show mlflow'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rvhj-8chj-8v3c",
  "modified" : "2026-05-20T01:30:42Z",
  "published" : "2026-03-31T15:31:56Z",
  "aliases" : [ "CVE-2026-0596" ],
  "summary" : "Mlflow: Command Injection when serving models with enable_mlserver=True",
  "details" : "A command injection vulnerability exists in Mlflow when serving a model with `enable_mlserver=True`. The `model_uri` is embedded directly into a shell command executed via `bash -c` without proper sanitization. If the `model_uri` contains shell metacharacters, such as `$()` or backticks, it allows for command substitution and execution of attacker-controlled commands. This vulnerability affects the latest version of mlflow/mlflow and can lead to privilege escalation if a higher-privileged service serves models from a directory writable by lower-privileged users.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mlflow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.9.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-0596"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mlflow/mlflow/pull/19738"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mlflow/mlflow/commit/202fac4c83ccc8544c087c142b80196d0e60695c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mlflow/mlflow"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/2e905add-f9f5-4309-a3db-b17de5981285"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-04T05:32:07Z",
    "nvd_published_at" : "2026-03-31T15:16:10Z"
  }
}