Skip to main content
WebguneWebgunebeta
Pricing
Toutes les failles

CritiqueCVE-2026-116692October 27, 2026

MLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifact modules

Exploitable facilement et à distance, avec des conséquences graves : à corriger sans attendre.

Sévérité
Critique9.8 / 10
Publiée le
October 27, 2026
Mise à jour
October 27, 2026

L'avis

Traduction automatique de l'avis officiel. En cas de doute, l'avis d'origine, plus bas, fait foi.

Résumé

MLflow 3.12.0 a introduit la prise en charge de l'enregistrement et de la désérialisation de scoreurs tiers dans MLflow OSS. Lors de la désérialisation d'un scoreur, le serveur accepte un chemin de module Python contrôlé par la requête sous l'un des quatre préfixes de package autorisés, importe ce module, obtient une classe contrôlée par la requête et l'instante de manière synchrone.

Un appelant HTTP peut combiner ce comportement avec les endpoints intégrés de MLflow pour l'exécution, l'expérience et l'upload d'artefacts :

  1. Créer une expérience dont l'emplacement d'artefact local pointe vers un package de scoreur autorisé et inscriptible.
  2. Créer une exécution, ce qui fait allouer à MLflow <artifact_location>/<run_id>/artifacts/.
  3. Uploader un module Python dans le répertoire d'artefacts de cette exécution.
  4. Soumettre un scoreur sérialisé tiers dont le chemin de module résout vers le fichier uploadé.
  5. Déclencher l'importation et la construction de classe côté serveur via /ajax-api/3.0/mlflow/scorer/invoke.

Sur le serveur sans authentification par défaut en utilisant l'image officielle MLflow v3.14.0, cela produit une exécution de code Python arbitraire non authentifiée avec les privilèges du processus du serveur MLflow. L'image reproduite exécute le processus en uid 0 et permet l'écriture dans son arbre de package Python installé.

La preuve de concept jointe est intentionnellement inoffensif. Le constructeur uploadé effectue une seule action : il écrit un marqueur aléatoire à côté de son propre artefact d'exécution uploadé. Le marqueur est ensuite télécharger via l'endpoint de downloading des artefacts d'exécution et vérifié pour une correspondance exacte.

Détails techniques

1. La liste blanche accepte les descendants créés par l'attacker

Au commit de publication 86cd7f5a1dc25a1387ad07c87811bbc30f62951c, mlflow/genai/scorers/scorer_utils.py définit ces racines autorisées :

THIRD_PARTY_SCORER_ALLOWED_MODULES = frozenset({
    "mlflow.genai.scorers.ragas",
    "mlflow.genai.scorers.deepeval",
    "mlflow.genai.scorers.trulens",
    "mlflow.genai.scorers.phoenix",
})

Dans mlflow/genai/scorers/base.py, le désérialiseur accepte soit une racine exacte, soit un descendant :

module_path == m or module_path.startswith(m + ".")

Il effectue ensuite les opérations suivantes en utilisant les valeurs contrôlées par la requête :

module = importlib.import_module(module_path)
scorer_class = getattr(module, class_name, None)
scorer_instance = scorer_class(**init_kwargs)

Un préfixe de nom de package n'est pas une barrière de provenance. Si le processus du serveur peut écrire sous un package autorisé, un descendant créé par l'attacker peut satisfaire la vérification de préfixe chaîne et devenir un code Python importable.

Emplacements de source pertinents au commit de publication v3.14.0 :

  • mlflow/genai/scorers/scorer_utils.py, modules de scoreurs tiers autorisés
  • mlflow/genai/scorers/base.py, désérialisation et construction de scoreurs tiers
2. La désérialisation se produit avant le traitement des traces

Dans mlflow/server/handlers.py, _invoke_scorer_handler() analyse le scoreur sérialisé fourni et appelle :

scorer = Scorer.model_validate_json(serialized_scorer)

Seulement après la désérialisation et la construction, l'handler appelle :

batches = get_trace_batches_for_scorer(trace_ids, scorer, tracking_store)

Le constructeur contrôlé par l'attacker s'exécute donc avant que le serveur ne valide ou ne résolve les IDs de trace fournis.

La classe de preuve minimale est délibérément pas un scoreur MLflow complet. Après que son constructeur a écrit le marqueur, la logique de batch de trace ultérieure accède aux attributs de scoreur que la classe de preuve n'implémente pas. L'HTTP 500 résultant se produit après l'exécution du code et ne invalide pas la preuve.

Aucune exécution de tâche en arrière-plan ou option de serveur d'exécution de tâche spéciale n'est nécessaire pour atteindre le constructeur.

3. La disposition des artefacts de MLflow place le module sous le préfixe approuvé

L'endpoint de création d'expérience accepte un artifact_location. Pour les expériences stockées par fichier, MLflow déduit chaque répertoire d'artefact d'exécution comme :

<artifact_location>/<run_id>/artifacts/

La preuve de concept sélectionne ce répertoire de package dans l'image officielle v3.14.0 :

file:///usr/local/lib/python3.10/site-packages/mlflow/genai/scorers/trulens

Après avoir créé une exécution et uploadé audit_<token>.py, l'emplacement de système de fichiers résultat est :

/usr/local/lib/python3.10/site-packages/mlflow/genai/scorers/trulens/<run_id>/artifacts/audit_<token>.py

Le chemin d'importation correspondant est :

mlflow.genai.scorers.trulens.<run_id>.artifacts.audit_<token>

L'attaque ne remplace pas un module de package existant. Elle crée un nouveau module portée par l'exécution dans la disposition d'artefact stockée par fichier normale. L'ID d'exécution est retourné à l'appelant.

4. Comportement d'authentification et d'autorisation

Avec l'authentification désactivée, comme dans la configuration de serveur reproduite par défaut, aucun identifiant n'est requis.

Lorsque l'authentification de base MLflow est activée, l'authentification s'applique toujours. Cependant, l'endpoint AJAX d'invocation de scoreur est affecté à validate_gateway_proxy, qui retourne Vrai sans effectuer de vérification de permission de ressource au niveau de l'expérience ou du scoreur.

L'exploitation pratique dans un déploiement authentifié nécessite toujours que l'appelant crée une expérience et une exécution et leur upload des artefacts. Le problème d'autorisation clé est que la désérialisation de scoreur elle-même n'est pas contrôlée par une vérification de permission spécifique pour l'expérience fournie avant l'importation.

Preuve de concept

La reproduction jointe est intentionnellement isolée :

  • image officielle exacte MLflow v3.14.0 pinée par digest de manifeste ;
  • réseau Docker désactivé ;
  • MLflow lié au loopback du conteneur ;
  • aucune commande shell ou rappel externe ;
  • aucune requête externe ;
  • aucun écrit sur le système de fichiers hôte ;
  • marqueur créé à côté de l'artefact d'exécution uploadé ;
  • marqueur récupéré via l'endpoint de download des artefacts d'exécution ; et
  • conteneur jetable supprimé après completion.

Exécuter :

./run-official-image.sh

Sortie attendue:

La suite de l'avis n'est pas traduite : elle figure dans l'avis d'origine, plus bas.

Composants touchés

ComposantVersions touchéesCorrigé en
mlflowPython (pip)>= 3.12.0rc0, < 3.17.03.17.0

Vous utilisez une version touchée ? Passez à la version corrigée, puis redéployez.

MLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifact modules

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:

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:

module_path == m or module_path.startswith(m + ".")

It then performs the following operations using request-controlled values:

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:

scorer = Scorer.model_validate_json(serialized_scorer)

Only after deserialization and construction does the handler call:

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:

<artifact_location>/<run_id>/artifacts/

The proof of concept selects this package directory in the official v3.14.0 image:

file:///usr/local/lib/python3.10/site-packages/mlflow/genai/scorers/trulens

After creating a run and uploading audit_<token>.py, the resulting filesystem location is:

/usr/local/lib/python3.10/site-packages/mlflow/genai/scorers/trulens/<run_id>/artifacts/audit_<token>.py

The corresponding import path is:

mlflow.genai.scorers.trulens.<run_id>.artifacts.audit_<token>

The attack does not overwrite an existing package module. It creates a new run-scoped module in the normal file-backed artifact layout. The run ID is returned to the caller.

4. Authentication and authorization behavior

With authentication disabled, as in the default reproduced server configuration, no credentials are required.

When MLflow basic authentication is enabled, authentication still applies. However, the scorer-invocation AJAX endpoint is assigned to validate_gateway_proxy, which returns True without performing an experiment- or scorer-level resource permission check.

Practical exploitation in an authenticated deployment still requires the caller to create an experiment and run and upload artifacts to them. The key authorization issue is that scorer deserialization itself is not gated by a resource-specific permission check for the supplied experiment before the import occurs.

Proof of concept

The attached reproduction is intentionally isolated:

  • exact official MLflow v3.14.0 image pinned by manifest digest;
  • Docker network disabled;
  • MLflow bound to container loopback;
  • no shell command or external callback;
  • no external request;
  • no host filesystem write;
  • marker created beside the uploaded run artifact;
  • marker retrieved through the run-artifact download endpoint; and
  • disposable container removed after completion.

Run:

./run-official-image.sh

Expected output:

MLFLOW_VERSION=3.14.0
PACKAGE_DIR=/usr/local/lib/python3.10/site-packages/mlflow/genai/scorers/trulens
CREATE_EXPERIMENT_STATUS=200
CREATE_RUN_STATUS=200
UPLOAD_STATUS=200
INVOKE_STATUS=500
PROOF_DOWNLOAD_STATUS=200
PROOF_MATCH=1
RESULT=AFFECTED

The security-relevant result is:

PROOF_MATCH=1
RESULT=AFFECTED

This proves that the attacker-controlled constructor executed in the MLflow server process before the later scorer-processing failure.

Reproduction environment

  • Release: MLflow v3.14.0
  • Release commit: 86cd7f5a1dc25a1387ad07c87811bbc30f62951c
  • Official image: ghcr.io/mlflow/mlflow:v3.14.0
  • Manifest digest: sha256:967de3ca34b6a5751718e380a0a383eb0ce1a6f5b484f363bd0da7559117a5f8
  • Python version: 3.10.18
  • Image-configured user: empty
  • Observed runtime user: uid 0
  • Server bind: 127.0.0.1:5000
  • Container network: disabled
  • Backend store: sqlite:////work/mlflow.db
  • Default artifact root: /work/artifacts
  • Authentication: disabled
  • Special job-execution option: none

Server command inside the disposable container:

mlflow server \
  --host 127.0.0.1 \
  --port 5000 \
  --backend-store-uri sqlite:////work/mlflow.db \
  --default-artifact-root /work/artifacts

Affected range and source lineage

The vulnerable third-party scorer deserialization behavior was introduced by commit:

02eea26035b9d8e65af31e6e8f058ca195f62cdd
Enable third-party scorer registration in OSS MLflow (#22634)

The feature is absent from v3.11.1 and first appears in v3.12.0.

Runtime reproduction succeeds on v3.14.0. The relevant mlflow/genai/scorers/base.py content is unchanged at master commit:

20858c9426a9644dfcf9545a92cbb534376779eb

No fixed release was identified as of 2026-07-12.

Impact

On the reproduced stock no-auth image, any network caller who can reach the tracking server can execute Python code as the MLflow process without credentials or user interaction.

Successful exploitation provides confidentiality, integrity, and availability impact over all data, credentials, network access, and filesystem locations available to the MLflow server process.

The stock image's runtime uid 0 increases container-level impact. Host impact still depends on the container runtime configuration, mounted paths, granted capabilities, socket exposure, and other isolation controls.

In authentication-enabled deployments, exploitation requires an authenticated principal capable of creating an experiment and run and uploading artifacts. The exact chain also requires the server process to be able to write beneath one of the allowed scorer packages. This condition holds in the reproduced official image and may hold in virtual environments installed and run by the same operating-system user.

A read-only container filesystem or a scorer package directory owned by a different, non-writable user blocks this exact placement chain.

Artifacts and attachments

Remote proof-of-concept script

POC Script: new_remote_poc.py (new window)

The remote proof of concept was then executed as follows. The disposable machine’s public IP has been redacted:

python3 new_remote_poc.py \
  --target http://<REDACTED_PUBLIC_IP> \
  --package-dir /usr/local/lib/python3.10/site-packages/mlflow/genai/scorers/trulens \
  --acknowledge-owned-target I_OWN_THIS_TARGET

The complete sanitized output was:

TARGET=http://<REDACTED_PUBLIC_IP>
VERSION_STATUS=200
MLFLOW_VERSION=3.14.0
CREATE_EXPERIMENT_STATUS=200
EXPERIMENT_ID=2
CREATE_RUN_STATUS=200
RUN_ID=9a2d665eb38940b68983f0586f623115
UPLOAD_STATUS=200
IMPORT_PATH=mlflow.genai.scorers.trulens.9a2d665eb38940b68983f0586f623115.artifacts.audit_1783843760683972103
INVOKE_STATUS=500
INVOKE_RESPONSE_PREVIEW='<!doctype html>\n<html lang=en>\n<title>500 Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n'
PROOF_DOWNLOAD_STATUS=200
EXPECTED_MARKER_SHA256=7a423b479df3524567fdf8cc3e7f6c4bfccc577fbcc4bac9519db8bd1cc61ed5
PROOF_MATCH=1
SERVER_CLEANUP_PATH=/usr/local/lib/python3.10/site-packages/mlflow/genai/scorers/trulens/9a2d665eb38940b68983f0586f623115
PROOF_OUTPUT_BEGIN
{
  "cwd": "/",
  "machine": "x86_64",
  "marker": "MLFLOW_REMOTE_SAFE_MARKER_1783843760683972103",
  "os_release": "PRETTY_NAME=\"Debian GNU/Linux 11 (bullseye)\"\nNAME=\"Debian GNU/Linux\"\nVERSION_ID=\"11\"\nVERSION=\"11 (bullseye)\"\nVERSION_CODENAME=bullseye\nID=debian\nHOME_URL=\"https://www.debian.org/\"\nSUPPORT_URL=\"https://www.debian.org/support\"\nBUG_REPORT_URL=\"https://bugs.debian.org/\"\n",
  "platform": "Linux-7.0.0-1006-aws-x86_64-with-glibc2.31",
  "python_implementation": "CPython",
  "python_version": "3.10.18",
  "server_datetime_utc": "2026-07-12T08:09:43.555055+00:00",
  "whoami": "root",
  "whoami_returncode": 0,
  "whoami_stderr": ""
}
PROOF_OUTPUT_END
RESULT=AFFECTED
EXPERIMENT_METADATA_CLEANUP_STATUS=200
CLEANUP_NOTE=discard the temporary test instance or remove SERVER_CLEANUP_PATH on the owned host

The proof file was also verified directly inside the disposable container:

cat /usr/local/lib/python3.10/site-packages/mlflow/genai/scorers/trulens/9a2d665eb38940b68983f0586f623115/artifacts/execution-proof-1783843760683972103.json

The file contained:

{
  "cwd": "/",
  "machine": "x86_64",
  "marker": "MLFLOW_REMOTE_SAFE_MARKER_1783843760683972103",
  "os_release": "PRETTY_NAME=\"Debian GNU/Linux 11 (bullseye)\"\nNAME=\"Debian GNU/Linux\"\nVERSION_ID=\"11\"\nVERSION=\"11 (bullseye)\"\nVERSION_CODENAME=bullseye\nID=debian\nHOME_URL=\"https://www.debian.org/\"\nSUPPORT_URL=\"https://www.debian.org/support\"\nBUG_REPORT_URL=\"https://bugs.debian.org/\"\n",
  "platform": "Linux-7.0.0-1006-aws-x86_64-with-glibc2.31",
  "python_implementation": "CPython",
  "python_version": "3.10.18",
  "server_datetime_utc": "2026-07-12T08:09:43.555055+00:00",
  "whoami": "root",
  "whoami_returncode": 0,
  "whoami_stderr": ""
}

The results demonstrate that:

  • the attacker-controlled module was uploaded beneath an allowed scorer package;
  • MLflow imported the request-selected module and invoked its constructor;
  • the constructor executed as the MLflow server process, which ran as root in the reproduced official image;
  • the constructor created a server-side proof file containing a random marker and bounded runtime information;
  • the proof file was retrieved successfully through MLflow’s artifact-download endpoint; and
  • the later HTTP 500 occurred only after constructor execution.

The authoritative reproduction indicators are:

UPLOAD_STATUS=200
PROOF_DOWNLOAD_STATUS=200
PROOF_MATCH=1
RESULT=AFFECTED

The disposable cloud machine and container were removed after testing.

Local Reproduction Scripts: run-official-image.sh (new window) poc_local.py (new window)

Catégorie : Improper Control of Generation of Code ('Code Injection') (CWE-94), Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (CWE-470)

Vecteur CVSS : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

  • github.comhttps://github.com/mlflow/mlflow/security/advisories/GHSA-26p8-2jq9-3vq9
  • github.comhttps://github.com/mlflow/mlflow/pull/25906
  • github.comhttps://github.com/mlflow/mlflow/commit/a732443e695c3c677680c54320efc394c81654ab
  • github.comhttps://github.com/mlflow/mlflow/releases/tag/v3.17.0
  • github.comhttps://github.com/advisories/GHSA-26p8-2jq9-3vq9
WebguneWebgune

The all-in-one sovereign cloud, built and hosted in France.

DiscordDiscordGitHubGitHub
+33 (0)9 72 23 25 00support@webgune.cloud

Product

  • Features
  • Pricing
  • Comparison
  • Changelog
  • Status
  • Vulnerabilities (CVE)
  • Contact

Developers

  • Documentation
  • Frameworks
  • API Reference
  • Examples
  • CLI
  • Tools & VS Code

Legal

  • Terms of Service (CGS)
  • Privacy policy
  • Legal notices
  • Accessibility
  • GDPR
  • DPA
  • Acceptable Use Policy

© 2026 KX712. All rights reserved. Webgune is a KX712 service.

Payments:VisaMasterCardAmerican ExpressApple PayGoogle PaySEPABancontact