Summary
MLflow contains a server-side request forgery vulnerability in the unauthenticated webhook test endpoint. An attacker may cause the server to follow redirects to internal services or cloud metadata endpoints and disclose response status and body when the endpoint is reachable.
Affected context
The issue occurs in MLflow deployments that expose the webhook testing API and allow the server to process attacker-influenced webhook URLs. The initial URL may be validated, but redirect handling and subsequent hostname resolution can bypass that validation when the destination is re-resolved without retaining the approved address.
Exploit preconditions
- Attack surface: The MLflow web API, specifically the webhook test endpoint
- Required access: Network access to the endpoint; authentication may not be required
- Trigger point: Server-side webhook delivery after URL validation and during redirect processing
- Why exploitation is possible: Redirect destinations are followed and resolved again without binding the request to the address validated for the original URL
Why this happens
The vulnerability is caused by incomplete server-side request validation. MLflow validates the original webhook hostname but does not consistently constrain later redirect targets or re-resolved addresses, allowing a request that initially appears acceptable to reach a restricted network destination.
This behavior maps to CWE-918: Server-Side Request Forgery, where application-controlled network requests can be redirected toward internal, local, or otherwise protected services.
Potential impact
- An attacker may access internal administrative or service endpoints
- Cloud instance metadata or temporary credentials could be exposed
- Response status and body data may be disclosed through the API
- Internal network topology and service information could be revealed
- Compromised credentials could enable broader access depending on their permissions
General mitigation guidance
Mitigation generally focuses on enforcing destination restrictions throughout the entire request lifecycle, including redirects and DNS resolution.
Common defensive patterns include:
- Applying allowlists for permitted schemes, hosts, ports, and network ranges
- Rejecting loopback, link-local, private, multicast, and cloud metadata destinations
- Revalidating every redirect target before following it
- Pinning or consistently checking the resolved address across connection establishment
- Disabling redirects by default unless they are explicitly required
- Returning minimal webhook delivery details to untrusted callers
- Running the service with least-privilege network access and credentials
- Isolating application egress through network policy or proxy controls
How teams detect issues like this
Detection can combine code analysis, runtime monitoring, and network policy enforcement:
- Use static analysis rules for server-side HTTP clients that accept user-controlled URLs
- Review redirect handling, DNS resolution, URL canonicalization, and address validation paths
- Flag webhook or callback features exposed without authentication or authorization
- Monitor outbound requests to private, loopback, link-local, and metadata address ranges
- Inspect logs for unusual redirect chains, high-volume webhook tests, or access to internal hostnames
- Enforce egress policies that prevent application workloads from reaching sensitive network segments
- Use automated security review tools to identify incomplete SSRF protections during development

