CVE-2023-6568: Cross-site Scripting (XSS) in MLflow
MLflow before 2.9.0 reflects the Content-Type header of a POST request into an error response without escaping it, in mlflow/server/auth/__init__.py. That gives reflected cross-site scripting in the victim's browser. MLflow 2.9.0 rejects POST and PUT requests with a missing or non-JSON Content-Type.
Published Dec 7, 2023 · Updated Apr 16, 2024 · Analysis Nov 2, 2026
What an attacker can do
In mlflow/server/auth/__init__.py, the user-supplied Content-Type header was put into a Python formatted string and returned to the user. An attacker can place JavaScript in that header. The server sends it back unescaped, so the script runs in the victim's browser in the context of the MLflow server's origin (CWE-79).
The attacker needs the victim to trigger a crafted POST to the MLflow server, for example from a malicious page. The CVSS vector is network, no privileges, user interaction required, and high confidentiality impact. A browser normally cannot set an arbitrary Content-Type on a cross-site request, so real-world exploitation depends on the browser and the request setup, which the sources do not explain.
If the script runs on the MLflow origin, it can read what that session can read: experiments, runs, model metadata and, on the auth-enabled server, user data. Integrity and availability impact are not rated.
Who is affected
The pip package mlflow below 2.9.0, specifically servers that use the built-in basic-auth module (mlflow/server/auth). Check your version:
pip show mlflowThe vulnerable code is in the auth module's handling of POST requests, so servers started without the auth app are less likely to hit this path.
mlflow
- Ecosystem
- PyPI
- Affected
- < 2.9.0
- Fixed in
- 2.9.0
- Check
pip show mlflow
How to fix it
Upgrade to mlflow 2.9.0 or later.
pip install -U "mlflow>=2.9.0"The fix, commit 28ff3f9, adds _validate_content_type in mlflow/server/validation.py. It returns an error when a POST or PUT has no Content-Type or one that is not allowed, after stripping parameters such as ; charset=utf-8. REST API docs now state that POST requests need application/json. API clients that send other content types will start to fail and must be updated. The sources list no workaround.
How to tell if you were hit
Search tracking server access logs and any reverse proxy logs for POST requests whose Content-Type header contains <, >, script, quotes or other markup, particularly to auth routes. After upgrading, such requests return an invalid-parameter error. Check browser reports from users who followed unusual links to your MLflow host.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
A reflected Cross-Site Scripting (XSS) vulnerability exists in the mlflow/mlflow repository, specifically within the handling of the Content-Type header in POST requests. An attacker can inject malicious JavaScript code into the Content-Type header, which is then improperly reflected back to the user without adequate sanitization or escaping, leading to arbitrary JavaScript execution in the context of the victim's browser. The vulnerability is present in the mlflow/server/auth/__init__.py file, where the user-supplied Content-Type header is directly injected into a Python formatted string and returned to the user, facilitating the XSS attack.
Questions
- Which MLflow version fixes CVE-2023-6568?
MLflow 2.9.0. Versions below it are affected.
- Will the fix break my API clients?
It can. After the fix the server rejects POST and PUT requests lacking a JSON Content-Type. Clients must send
application/json, and parameters such as charset are accepted.- Does the attacker need to be logged in?
No. The vector lists no privileges. The victim must interact with a crafted request, so this is reflected rather than stored XSS.
- Is it exploited in the wild?
No source I read says so, and the entry has no CISA KEV data.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More MLflow vulnerabilities
All MLflow entriesCVE-2026-116690
MLflow vulnerable to arbitrary file read on unauthenticated servers via prompt model version source
high7.5Oct 27, 2026CVE-2026-116691
MLflow CrewAI autologging records LLM provider API keys in logged trace spans
medium6.5Oct 27, 2026CVE-2026-116692
MLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifact modules
critical9.8Oct 27, 2026CVE-2026-115886
MLflow: SSRF on unauthenticated MLflow servers via third-party scorer kwargs in the scorer invoke, register, and GenAI evaluate endpoints
medium6.5Oct 23, 2026CVE-2026-53995
MLflow FileStore trace IDs allow path traversal and arbitrary file writes
high8.2Oct 20, 2026GHSA-gqvg-gmmx-x4hm
MLFLOW_ALLOW_PICKLE_DESERIALIZATION=False safety control bypassed by mlflow.statsmodels flavor — RCE via crafted model artifact
high8.8Sep 1, 2026
