Severity:

HIGH RISK

(7.1)

SSRF in MLflow Webhook Handling

CVE-2026-2393

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Internal network access and potential cloud credential exposure via SSRF

Severity:

HIGH RISK

(7.1)

CVSS version:

3.0

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

MLflow versions prior to 3.9.0 contain a Server-Side Request Forgery (SSRF) flaw in the webhook creation and delivery logic, where user-supplied webhook URLs are used without proper validation.

An authenticated attacker can register arbitrary callback endpoints and force the MLflow backend to send HTTP requests to internal services, cloud metadata endpoints, or external servers, which may lead to cloud credential theft, internal network probing, or data exfiltration.

Affected context

This vulnerability affects MLflow deployments that:

  • Expose the MLflow server with webhook functionality enabled,
  • Allow authenticated users or automation to create or manage webhooks,
  • Run the MLflow backend in an environment with network connectivity to internal services, cloud metadata endpoints, or sensitive APIs.

The issue arises in the _create_webhook() handler, which accepts a url parameter directly from user input, and in _send_webhook_request(), which uses that URL for outbound HTTP POST requests without validation or restriction.

Exploit preconditions

  • Attack surface: MLflow HTTP/REST API handling webhook creation and management.
  • Required access: Valid authenticated access capable of invoking _create_webhook() (e.g., MLflow user, CI/CD integration, or service account).
  • Trigger point: Creation or modification of a webhook with a crafted URL, followed by an event that causes _send_webhook_request() to fire (such as model registration, experiment events, or other configured triggers).
  • Why exploitation is possible:
  • The url parameter is treated as trusted and used directly as the target of HTTP POST requests.
  • There is no scheme restriction (e.g., blocking file://, gopher://, or other non-HTTP/HTTPS schemes if the underlying HTTP client supports them).
  • There is no allowlist or denylist for target hosts, IP ranges, or network locations.
  • The MLflow server typically has more privileged network visibility than the attacker's client, enabling SSRF into otherwise inaccessible networks and services.

Why this happens

The core issue is a classic Server-Side Request Forgery pattern, mapped to CWE-918, where server-side functionality performs outbound network requests to a URL derived from user-controlled input without adequate validation or access control.

In MLflow, the webhook subsystem is designed to emit HTTP callbacks when certain events occur. The _create_webhook() function records whatever url a caller supplies, and _send_webhook_request() later uses this value to dispatch HTTP POST requests. Because there is no enforcement of safe schemes, host allowlists, or IP range checks, an attacker with webhook management privileges can coerce the server into acting as an HTTP proxy to:

  • Reach internal services bound only to private interfaces or VPC networks,
  • Query cloud metadata services that expose credentials or tokens,
  • Interact with other protected HTTP endpoints from the perspective of the MLflow server.

This pattern exemplifies an untrusted input to outbound request flaw: the server becomes a confused deputy that leverages its own network privileges based on attacker-supplied URLs.

Potential impact

  • The MLflow server may send HTTP requests to cloud metadata endpoints, potentially exposing access tokens or instance credentials.
  • Attackers could perform internal network scanning or service enumeration via crafted webhook targets.
  • Sensitive configuration or diagnostic endpoints reachable only from the MLflow host could be queried indirectly.
  • Internal APIs, admin consoles, or data stores that trust the MLflow server's network location may be accessed.
  • Outbound requests to attacker-controlled servers could leak environment details, headers, or other metadata useful for further attacks.

General mitigation guidance

Effective mitigation focuses on constraining where webhook requests can go and treating webhook URLs as untrusted input:

  • Enforce strict URL validation before persisting or using webhook URLs:
  • Accept only intended schemes (typically https, optionally http with additional safeguards).
  • Reject ambiguous, unsupported, or dangerous schemes.
  • Apply host and network allowlisting for outbound webhook destinations:
  • Restrict targets to known, legitimate domains or service endpoints used for integrations.
  • Block private IP ranges, link-local addresses, and metadata service IPs at the application level where possible.
  • Centralize outbound HTTP logic behind a controlled client or proxy that:
  • Enforces DNS resolution policies,
  • Implements network-level filters for internal and special-purpose addresses.
  • Minimize the privileges of the MLflow server's runtime environment:
  • Avoid granting unnecessary access to internal subnets or sensitive control planes.
  • Use network segmentation, security groups, or firewall rules to restrict egress where feasible.
  • Treat webhook configuration as a sensitive capability:
  • Limit who can create or modify webhooks.
  • Apply approval workflows or policy checks for new destinations.

How teams detect issues like this

Organizations can identify and monitor this class of SSRF risk through a combination of code-level and operational controls:

  • Static analysis and code scanning:
  • Search for outbound HTTP client usage where the target URL originates from HTTP request parameters or other user-controlled fields.
  • Flag code paths that construct HTTP requests without passing through a validation or sanitization layer.
  • Use custom rules to detect direct use of unvalidated url parameters in network calls.
  • Code review practices:
  • Require reviewers to explicitly verify how webhook endpoints and callback URLs are validated.
  • Look for centralized helpers that enforce allowlists or scheme/host checks, and question any direct HTTP client usage bypassing them.
  • Runtime monitoring and logging:
  • Log the destination hosts, schemes, and paths used for webhook callbacks and other outbound requests.
  • Set alerts for requests to unusual destinations such as:
  • Internal IP ranges (e.g., RFC1918 addresses),
  • Known cloud metadata endpoints,
  • Unexpected domains not associated with business integrations.
  • Network-level controls:
  • Enforce egress filtering and DNS policies to prevent the MLflow server from reaching restricted internal segments or metadata services.
  • Use network monitoring to detect anomalous outbound traffic patterns originating from MLflow hosts.

Sources

SourceLink
github.comgithub.com/mlflow/mlflow/commit/64aa0ab7207f9c649b59ba1a5f40d82196817389
huntr.comhuntr.com/bounties/04ef100d-06b5-4a70-95b1-b7be23aa8150

Frequently asked

questions

It is exploitable by any party that can authenticate to the MLflow server and create or manage webhooks. The attacker does not need direct network access to the internal services being targeted; the MLflow server issues the requests on their behalf.

The attacker must have authenticated access with permissions to create or configure webhooks. They do not typically need administrative privileges, but they must be able to control the url parameter used for webhook delivery.

The safest pattern is to treat callback URLs as untrusted and restrict outbound requests to a curated allowlist of domains and schemes. All webhook destinations should pass through a validation layer that enforces scheme restrictions, host/domain allowlists, and IP range checks before any network call is made.

Establish a design rule that no user-supplied URL is used directly for outbound requests. Centralize outbound HTTP logic behind vetted helpers that apply scheme validation, allowlists, and network protections; combine this with code review standards, static analysis rules, and egress controls to ensure new SSRF patterns are caught early.

Find out what's already
exploitable in your codebase.