Skip to content
RCE Disclosed report Intermediate CVE-2026-0596

Mlflow: Command Injection when serving models with enable_mlserver=True

The model_uri parameter is inserted unsanitised into a shell command run via bash -c, so shell metacharacters allow command substitution. An attacker who can control the model_uri could execute arbitrary commands, potentially escalating privileges if a higher-privileged service serves models from a writable directory.

mlflow/mlflow

Originally disclosed on huntr

Critical View original

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.

From the GitHub Advisory Database (GHSA-rvhj-8chj-8v3c, 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 model_uri is concatenated into a shell command string passed to bash -c without escaping or validation, allowing shell metacharacters to be interpreted.

Impact

An attacker could execute arbitrary commands, and this may lead to privilege escalation if a higher-privileged service serves models from a directory writable by lower-privileged users.

What the attacker needed

Enable_mlserver=True; control over model_uri; writable model directory for escalation

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.

When a program builds a command line by gluing user input into it, special characters in that input can be interpreted by the shell as instructions rather than data. Here the model location is placed straight into a shell command, so characters that trigger command substitution let an attacker run their own commands. This is dangerous when a more powerful service processes files from a place a weaker user can write to.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from mlflow/mlflow

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.