AI and data stack advisories

Severe, 6 weeks486Projects324

486 severe, 6 weeks · 324 projects

MLflowGHSA-26p8-2jq9-3vq9

MLflow: unsafe deserialization

MLflow

CVE-2026-116692 · Published Oct 27, 2026

Critical9.8
Fix: upgrade to 3.17.0 or later
GitHub advisory

Summary

MLflow 3.12.0 introduced registration and deserialization support for third-party scorers in OSS MLflow. During scorer deserialization, the server accepts a request-controlled Python module path beneath one of four allowed package prefixes, imports that module, obtains a request-controlled class, and instantiates it synchronously.

An HTTP caller can combine this behavior with MLflow's built-in experiment, run, and artifact-upload endpoints:

1. Create an experiment whose local artifact location points to a writable allowed scorer package.

2. Create a run, causing MLflow to allocate <artifact_location>/<run_id>/artifacts/.

3. Upload a Python module into that run artifact directory.

4. Submit a serialized third-party scorer whose module path resolves to the uploaded file.

5. Trigger server-side import and class construction through /ajax-api/3.0/mlflow/scorer/invoke.

On the default no-auth server using the official MLflow v3.14.0 image, this produces unauthenticated arbitrary Python code execution with the privileges of the MLflow server process. The reproduced image runs the process as uid 0 and permits writes to its installed Python package tree.

The attached proof of concept is intentionally harmless. The uploaded constructor performs one action only: it writes a random marker beside its own uploaded run artifact. The marker is then downloaded through...

Affected versions

PackageAffectedFixed in
mlflow
PyPI
>= 3.12.0rc0, < 3.17.03.17.0
Details and references

## Summary MLflow 3.12.0 introduced registration and deserialization support for third-party scorers in OSS MLflow. During scorer deserialization, the server accepts a request-controlled Python module path beneath one of four allowed package prefixes, imports that module, obtains a request-controlled class, and instantiates it synchronously. An HTTP caller can combine this behavior with MLflow's built-in experiment, run, and artifact-upload endpoints: 1. Create an experiment whose local artifact location points to a writable allowed scorer package. 2. Create a run, causing MLflow to allocate `<artifact_location>/<run_id>/artifacts/`. 3. Upload a Python module into that run artifact directory. 4. Submit a serialized third-party scorer whose module path resolves to the uploaded file. 5. Trigger server-side import and class construction through `/ajax-api/3.0/mlflow/scorer/invoke`. On the default no-auth server using the official MLflow v3.14.0 image, this produces unauthenticated arbitrary Python code execution with the privileges of the MLflow server process. The reproduced image runs the process as uid 0 and permits writes to its installed Python package tree. The attached proof of concept is intentionally harmless. The uploaded constructor performs one action only: it writes a random marker beside its own uploaded run artifact. The marker is then downloaded through MLflow's run-artifact endpoint and checked for an exact match. ## Technical details ### 1. The allow-list accepts attacker-created descendants At release commit `86cd7f5a1dc25a1387ad07c87811bbc30f62951c`, `mlflow/genai/scorers/scorer_utils.py` defines these allowed roots: ```python THIRD_PARTY_SCORER_ALLOWED_MODULES = frozenset({ "mlflow.genai.scorers.ragas", "mlflow.genai.scorers.deepeval", "mlflow.genai.scorers.trulens", "mlflow.genai.scorers.phoenix", }) ``` In `mlflow/genai/scorers/base.py`, the deserializer accepts either an exact root or any descendant: ```python module_path == m or module_path.startswith(m + ".") ``` It then performs the following operations using request-controlled values: ```python module = importlib.import_module(module_path) scorer_class = getattr(module, class_name, None) scorer_instance = scorer_class(**init_kwargs) ``` A package-name prefix is not a provenance boundary. If the server process can write below an allowed package, an attacker-created descendant can satisfy the string-prefix check and become importable Python code. Relevant source locations at the v3.14.0 release commit: * `mlflow/genai/scorers/scorer_utils.py`, allowed third-party scorer modules * `mlflow/genai/scorers/base.py`, third-party scorer deserialization and construction ### 2. Deserialization occurs before trace processing In `mlflow/server/handlers.py`, `_invoke_scorer_handler()` parses the supplied serialized scorer and calls: ```python scorer = Scorer.model_validate_json(serialized_scorer) ``` Only after deserialization and construction does the handler call: ```python batches = get_trace_batches_for_scorer(trace_ids, scorer, tracking_store) ``` The attacker-controlled constructor therefore runs before the server validates or resolves the supplied trace IDs. The minimal proof class is deliberately not a complete MLflow scorer. After its constructor writes the marker, later trace-batching logic accesses scorer attributes that the proof class does not implement. The resulting HTTP 500 occurs after code execution and does not invalidate the proof. No background job execution or special job-execution server option is required to reach the constructor. ### 3. MLflow's artifact layout places the module under the trusted prefix The experiment creation endpoint accepts an `artifact_location`. For file-backed experiments, MLflow derives each run artifact directory as: ```text <artifact_location>/<run_id>/artifacts/ ``` The proof of concept selects this package directory in the official v3.14.0 image: ```text file:///usr/loc

CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Severity from
GitHub (reviewed advisory)
Weakness
CWE-470, CWE-94
Also known as
CVE-2026-116692

More MLflow advisories

All MLflow