-
Notifications
You must be signed in to change notification settings - Fork 54
testbeds:CVE-2026-0545 #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dyeddala
wants to merge
1
commit into
google:main
Choose a base branch
from
dyeddala:feature/CVE-2026-0545
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| FROM python:3.10-slim | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install a vulnerable version of MLflow (3.9.0 or earlier) | ||
| RUN pip install "mlflow[auth]==3.9.0" uvicorn | ||
|
|
||
| # Copy necessary configuration and code | ||
| COPY basic_auth.ini /app/ | ||
| COPY demo_job.py /app/ | ||
| COPY start.sh /app/ | ||
|
|
||
| # Make the start script executable | ||
| RUN chmod +x /app/start.sh | ||
|
|
||
| # Expose the MLflow server port | ||
| EXPOSE 5590 | ||
|
|
||
| # Start the MLflow server via the wrapper script | ||
| CMD ["/app/start.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| # CVE-2026-0545: MLflow Basic Auth Bypass & Unauthenticated Job Execution | ||
|
|
||
| MLflow contains an access control vulnerability in its job execution subsystem (`MLFLOW_SERVER_ENABLE_JOB_EXECUTION`). When job execution is enabled alongside basic authentication on MLflow servers, authorization checks fail to properly restrict unauthenticated or low-privileged HTTP requests to job management endpoints (e.g., `/ajax-api/3.0/jobs/`). This weakness allows unauthorized users to trigger pre-configured job functions and execute underlying commands within the server container context. | ||
|
|
||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| | Attribute | Details | | ||
| | :--- | :--- | | ||
| | **CVE ID** | CVE-2026-0545 | | ||
| | **Vulnerability Type** | Incorrect Authorization / Improper Access Control (CWE-284) | | ||
| | **Vulnerable Versions** | `mlflow[auth] <= 3.9.0` | | ||
| | **Patched / Fixed Versions** | `mlflow[auth] >= 3.9.1` | | ||
| | **Impact** | Remote Code Execution / Unauthorized Job Execution | | ||
|
|
||
| --- | ||
|
|
||
| ## Environment Setup | ||
|
|
||
| To deploy the vulnerable environment for testing or verification in an isolated laboratory context, use the following deployment configuration files. | ||
|
|
||
| ### Configuration Files | ||
|
|
||
| #### `basic_auth.ini` | ||
| ```ini | ||
| [mlflow] | ||
| default_permission = NO_PERMISSIONS | ||
| database_uri = sqlite:///basic_auth.db | ||
| admin_username = admin | ||
| admin_password = password1234 | ||
| authorization_function = mlflow.server.auth:authenticate_request_basic_auth | ||
| ``` | ||
|
|
||
| #### `demo_job.py` | ||
| ```python | ||
| from mlflow.server.jobs import job | ||
| import subprocess | ||
|
|
||
| @job(name="run_task", max_workers=1) | ||
| def run_task(command="id"): | ||
| return subprocess.check_output(command, shell=True).decode() | ||
| ``` | ||
|
|
||
| #### `start.sh` | ||
| ```bash | ||
| #!/bin/bash | ||
|
|
||
| # Configuration for MLflow Basic Auth | ||
| export MLFLOW_AUTH_CONFIG_PATH=/app/basic_auth.ini | ||
| export MLFLOW_FLASK_SERVER_SECRET_KEY=test-secret-key | ||
|
|
||
| # Enable vulnerable job execution settings | ||
| export MLFLOW_SERVER_ENABLE_JOB_EXECUTION=true | ||
| export _MLFLOW_SUPPORTED_JOB_FUNCTION_LIST=demo_job.run_task | ||
| export _MLFLOW_ALLOWED_JOB_NAME_LIST=run_task | ||
| export PYTHONPATH=/app | ||
|
|
||
| mkdir -p /app/artifacts | ||
|
|
||
| exec mlflow server \ | ||
| --app-name=basic-auth \ | ||
| --host 0.0.0.0 \ | ||
| --port 5590 \ | ||
| --backend-store-uri sqlite:///backend.db \ | ||
| --default-artifact-root /app/artifacts | ||
| ``` | ||
|
|
||
| #### `Dockerfile` | ||
| ```dockerfile | ||
| FROM python:3.10-slim | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install vulnerable MLflow version | ||
| RUN pip install "mlflow[auth]==3.9.0" uvicorn | ||
|
|
||
| COPY basic_auth.ini /app/ | ||
| COPY demo_job.py /app/ | ||
| COPY start.sh /app/ | ||
|
|
||
| RUN chmod +x /app/start.sh | ||
|
|
||
| EXPOSE 5590 | ||
|
|
||
| CMD ["/app/start.sh"] | ||
| ``` | ||
|
|
||
| #### `docker-compose.yml` | ||
| ```yaml | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| mlflow-server: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| container_name: mlflow_app | ||
| ports: | ||
| - "5590:5590" | ||
| volumes: | ||
| - mlflow_data:/app/artifacts | ||
| restart: unless-stopped | ||
|
|
||
| volumes: | ||
| mlflow_data: | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [mlflow] | ||
| default_permission = NO_PERMISSIONS | ||
| database_uri = sqlite:///basic_auth.db | ||
| admin_username = admin | ||
| admin_password = password1234 | ||
| authorization_function = mlflow.server.auth:authenticate_request_basic_auth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| from mlflow.server.jobs import job | ||
| import subprocess | ||
|
|
||
| @job(name="run_task", max_workers=1) | ||
| def run_task(command="id"): | ||
| return subprocess.check_output(command, shell=True).decode() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| mlflow-server: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| container_name: mlflow_app | ||
| ports: | ||
| - "5590:5590" | ||
| volumes: | ||
| # Only keep the persistent data storage mount | ||
| - mlflow_data:/app/artifacts | ||
| restart: unless-stopped | ||
|
|
||
| volumes: | ||
| mlflow_data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Configuration for MLflow Basic Auth | ||
| export MLFLOW_AUTH_CONFIG_PATH=/app/basic_auth.ini | ||
| export MLFLOW_FLASK_SERVER_SECRET_KEY=test-secret-key | ||
|
|
||
| # Requirements to trigger the bypass | ||
| export MLFLOW_SERVER_ENABLE_JOB_EXECUTION=true | ||
| export _MLFLOW_SUPPORTED_JOB_FUNCTION_LIST=demo_job.run_task | ||
| export _MLFLOW_ALLOWED_JOB_NAME_LIST=run_task | ||
| export PYTHONPATH=/app | ||
|
|
||
| mkdir -p /app/artifacts | ||
|
|
||
| exec mlflow server \ | ||
| --app-name=basic-auth \ | ||
| --host 0.0.0.0 \ | ||
| --port 5590 \ | ||
| --backend-store-uri sqlite:///backend.db \ | ||
| --default-artifact-root /app/artifacts |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can instead say checkout the files and run the docker command to deploy vulnerable image. Also document how to deploy a non vulnerable version