MLflow: Stored XSS in the Tracking UI via the Run Tag mlflow.source.name

An anonymous attacker sets the run tag mlflow.source.name through the REST API; when a user clicks the source link in the tracking UI, the attacker's script runs in the origin of the MLflow server.

Advisory ID: TP-2026-135
Product: MLflow (open-source platform for experiment tracking and model management in machine learning)
Vulnerability type: Stored cross-site scripting via the run tag mlflow.source.name (CWE-79)
CVE: not requested
CVSS 3.1: 6.1 (Medium) · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Affected versions: up to and including 3.18.0 (tested live: 3.13.0, checked in source: 3.18.0)
Status: fixed on the master development branch, not yet part of any release
Reported: 7 June 2026

Summary

MLflow is an open-source platform for experiment tracking and model management; the tracking server shows runs and their source in a web UI. The UI builds the link in the Source and Version columns from the run tag mlflow.source.name and does not check the URL scheme in the branch for generic git sources. A value with the javascript: scheme that matches the git pattern ends up unchanged in the href of a link with target="_top". The tracking server's REST API requires no login in the default configuration, so an anonymous attacker sets the tag. When a user clicks the source link in the runs table or on the run page, the attacker's script runs in the origin of the MLflow server.

Root cause

getGitRegex captures everything before the substring git as its first group and places no requirement on the scheme (mlflow/server/js/src/common/utils/Utils.tsx:292-294).
In the generic git branch getGitRepoUrl only replaces git@ with https:// and otherwise returns the URL with the tag's own scheme (mlflow/server/js/src/common/utils/Utils.tsx:319-324), and getGitCommitUrl does the same (mlflow/server/js/src/common/utils/Utils.tsx:347-349).
renderSource and renderSourceVersion place the result into <a target="_top" href=...> with no further check (mlflow/server/js/src/common/utils/Utils.tsx:483, mlflow/server/js/src/common/utils/Utils.tsx:745).
The sibling builders for notebook and job sources return a URL only when Utils.isValidHttpUrl accepts it (mlflow/server/js/src/common/utils/Utils.tsx:543, mlflow/server/js/src/common/utils/Utils.tsx:586); the git branch lacks this check.
The tracking server sends no Content-Security-Policy, and POST /api/2.0/mlflow/runs/set-tag is reachable anonymously unless the optional basic-auth app is enabled.

Proof of Concept

Schematically:

POST /api/2.0/mlflow/runs/set-tag HTTP/1.1
Content-Type: application/json

{"run_id": "<run id>", "key": "mlflow.source.name",
 "value": "<URL with the javascript: scheme that matches the git pattern>"}

The value passes the git branch unchanged and becomes the href of the source link; target="_top" keeps the navigation in the same browsing context, so the browser runs the script in the MLflow origin on click. Verified on 3.13.0 in the default configuration: after setting the tag anonymously and clicking the source link, alert(document.domain) ran in the origin of the tracking server. With the basic-auth app enabled, the same path gave a user with EDIT permission on an experiment administrator rights inside an administrator's session.

Impact

  • Script execution in the origin of the tracking server for every user who clicks the source link of a prepared run.
  • The script drives the REST API with the victim's rights: reading, changing and deleting runs, parameters, metrics and artifacts.
  • In the default configuration an anonymous attacker with network access to the server sets the tag; no login is needed.
  • With the basic-auth app enabled, an account with EDIT permission becomes an administrator account once an administrator clicks the link; this configuration scores 9.0 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N).

References

Is Something Like This in Your Software?

Our team found this vulnerability during its work. Have your applications tested by the same specialists, with a penetration test from turingpoint.