/

CVE-2026-33990

Severity:

CRITICAL RISK

(9.1)

SSRF in Docker Model Runner OCI Registry Token Exchange

CVE-2026-33990

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Internal network access and data exfiltration via SSRF

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

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

Summary

Docker Model Runner's OCI registry token exchange flow contains a server-side request forgery (SSRF) flaw where the service follows a realm URL from a registry's WWW-Authenticate header without validating the destination.

A malicious OCI registry can abuse this behavior to force Model Runner to issue arbitrary HTTP GET requests to internal services and exfiltrate their responses back to the attacker, potentially exposing sensitive internal endpoints and metadata.

Affected context

This vulnerability affects environments where Docker Model Runner is used to pull AI models from OCI-compatible registries and relies on the registry-provided WWW-Authenticate header for token acquisition.

Risk is elevated when:

  • Model Runner can reach internal or localhost-only services (e.g., 127.0.0.1, metadata services, admin dashboards) from its network context.
  • Administrators connect Model Runner to untrusted or attacker-controlled OCI registries.
  • Model Runner is accessible over localhost TCP or similar configurations that allow external users to trigger model pulls.

In deployments where outbound network access is tightly restricted and registries are fully trusted, the practical exposure is reduced but still merits defense-in-depth validation.

Exploit preconditions

  • Attack surface: The OCI registry authentication flow used when Model Runner pulls models.
  • Required attacker position:
  • Ability to operate or control an OCI registry endpoint that Model Runner is configured to use, or
  • Ability to influence the registry configuration/endpoint that Model Runner communicates with.
  • Trigger point: The point at which Model Runner receives a WWW-Authenticate header from the registry and follows the realm URL to obtain a token.
  • Why exploitation is possible:
  • Model Runner accepts the realm value from the WWW-Authenticate header without validating:
  • URL scheme (e.g., http vs https),
  • Hostname or IP (e.g., 127.0.0.1, localhost, internal RFC1918 ranges),
  • Network zone (e.g., link-local, metadata endpoints).
  • The token exchange mechanism forwards data obtained from internal services back to the attacker, including via the Authorization: Bearer header and direct HTTP response reflection.

Why this happens

The core issue is an instance of CWE-918: Server-Side Request Forgery (SSRF), where the server-side component (Docker Model Runner) performs outbound HTTP requests to attacker-influenced URLs.

Instead of treating the realm parameter in the WWW-Authenticate header as untrusted input requiring strict validation, the implementation assumes the registry will provide a safe URL and constructs follow-up HTTP requests to whatever endpoint is supplied.

Architecturally, this couples authentication logic to unvalidated, externally provided URLs and fails to enforce:

  • Allowlists of trusted hosts or domains for token services,
  • Restrictions on loopback, link-local, and private IP ranges,
  • Scheme checks and consistency with the original registry's security properties.

This pattern enables an attacker-controlled registry to pivot Model Runner into acting as a network proxy into otherwise non-routable internal services.

Potential impact

  • Access to internal HTTP services bound to localhost or private IP ranges (e.g., 127.0.0.1:3000, admin APIs, local dashboards).
  • Exfiltration of sensitive information from internal endpoints, such as:
  • Service configuration and debug endpoints.
  • Internal health or metrics APIs.
  • Environment or metadata services exposing credentials or tokens.
  • Abuse of Model Runner as an HTTP relay, including:
  • Enumerating internal network services reachable from the host/container.
  • Reading data that should be accessible only from inside the host or cluster.
  • Potential stepping stone to further compromise, if exposed internal endpoints permit state changes, authentication bypass, or administrative actions.

General mitigation guidance

Mitigation centers on treating all registry-provided URLs as untrusted and constraining where the application is allowed to connect.

Robust defensive patterns include:

  • Host and network allowlisting:
  • Restrict outbound token exchange to a small, explicit set of trusted domains or hostnames.
  • Enforce that realm URLs must share a trusted origin or be derived from configuration, not directly from headers.
  • IP and scheme validation:
  • Reject realm URLs that resolve to localhost, link-local, or private RFC1918 address ranges when they originate from untrusted registries.
  • Enforce secure schemes (e.g., https) and consistency between the registry endpoint and its token service.
  • Logical separation of responsibilities:
  • Decouple authentication and registry metadata parsing so that URL destinations are centrally validated and not ad hoc.
  • Network-layer hardening:
  • Use firewall rules, container networking policies, or sidecars to prevent the Model Runner process from accessing sensitive internal services and metadata endpoints.
  • Where possible, isolate Model Runner into a network segment with strictly limited egress.
  • Principle of least privilege:
  • Limit the internal services that are even reachable from the Model Runner host/container.
  • Avoid co-locating sensitive management endpoints on interfaces accessible from application runtimes.

In environments like Docker Desktop, enabling robust isolation features (such as enhanced container isolation) helps ensure containers cannot directly access the Model Runner process or its network privileges.

How teams detect issues like this

Detection approaches can combine code-centric and operational monitoring techniques:

  • Static analysis and code review:
  • Search for HTTP client calls where URLs or hosts are derived from response headers (e.g., WWW-Authenticate, Location) or other remotely controlled data.
  • Flag URL construction that does not pass through a centralized validation layer enforcing host and IP allowlists.
  • Review authentication and token exchange flows for trust in registry-supplied URLs or parameters.
  • Configuration and policy checks:
  • Enforce policies that restrict which registries Model Runner can talk to, and require explicit approval for connecting to external or third-party registries.
  • Validate that network policies disallow access from Model Runner to sensitive metadata and admin endpoints.
  • Runtime and log monitoring:
  • Monitor Model Runner logs for unusual or unexpected outbound requests to localhost or internal IP ranges during registry authentication flows.
  • Implement alerts for token exchange requests where the target host does not match known, configured registries.
  • Periodic security assessments:
  • Use internal SSRF testing patterns in staging environments to probe for unvalidated outbound requests from Model Runner and similar components.
  • Combine network-scoped scanners and application security tools to identify services with dynamic URL following based on untrusted inputs.

Sources

SourceLink
github.comgithub.com/docker/model-runner/security/advisories/GHSA-x2f5-332j-9xwq

Frequently asked

questions

Exploitability depends primarily on whether Docker Model Runner is configured to interact with untrusted or attacker-controlled OCI registries and whether it can reach internal services from its network position.

In tightly controlled environments with only trusted registries and constrained egress, the practical risk is reduced, but the underlying flaw still warrants remediation.

No direct host access is required.

The attacker mainly needs control of a registry endpoint (or influence over which registry Model Runner uses) and a way to trigger model pulls so that the vulnerable token exchange flow executes.

The most robust fix is to introduce a strict validation and normalization layer for any remote URLs used in authentication or token exchange:

  • Only allow token service URLs that originate from configuration or a trusted mapping.
  • Enforce host and IP allowlists and block loopback, link-local, and private ranges where appropriate.
  • Treat all header-derived URLs as untrusted and subject them to centralized policy checks before making outbound requests.

Preventing SSRF requires designing components with explicit trust boundaries for outbound calls:

  • Never construct outbound HTTP destinations directly from untrusted data (headers, parameters, JSON fields) without validation.
  • Centralize URL validation, including DNS resolution checks and network-zone controls.
  • Combine secure coding practices with network segmentation and egress controls so that even if a URL validation bug appears, sensitive internal services remain unreachable.
Find out what's already
exploitable in your codebase.