/

CVE-2026-85180

Severity:

HIGH RISK

(7.5)

SSRF (CWE-918) in Ollama Tensor-Layer Model Downloads

CVE-2026-85180

Awaiting Analysis

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized Server-Side Network Requests

Severity:

HIGH RISK

(7.5)

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

Ollama does not sufficiently validate redirect destinations when downloading tensor-layer model blobs, allowing an attacker-controlled registry to redirect requests to arbitrary hosts.

An unauthenticated attacker may use this behavior to make the Ollama server send requests to internal services, including cloud metadata endpoints, when a vulnerable model is pulled.

Affected context

The vulnerability occurs in Ollama deployments that pull tensor-layer models from registries and follow download redirects without enforcing an appropriate destination policy. The risk is higher when the Ollama server can reach internal network services, cloud instance metadata endpoints, or other sensitive administrative interfaces that are not directly accessible to the attacker.

Exploit preconditions

  • Attack surface: Tensor-layer model download and redirect handling
  • Required access: No direct authentication to Ollama may be required; the attacker needs to control or influence a model registry or manifest consumed by the server
  • Trigger point: Pulling a model whose tensor-layer manifest causes a blob request to be redirected
  • Why exploitation is possible: Redirect destinations are not sufficiently validated against trusted hosts, schemes, or network ranges, allowing server-side requests to attacker-selected or internal destinations

Why this happens

The underlying bug is insufficient validation of user-influenced redirect destinations during server-side resource retrieval. A download client that automatically follows redirects without applying an explicit allowlist, scheme restriction, and internal-address policy can be coerced into making requests outside the intended registry boundary.

This behavior maps to CWE-918: Server-Side Request Forgery, where an attacker influences a server into sending network requests to unintended locations.

Potential impact

  • The server may make requests to internal network services
  • Cloud metadata credentials or configuration may be exposed
  • Internal service endpoints may be enumerated
  • Administrative interfaces may receive unauthorized requests
  • Network segmentation assumptions may be weakened
  • Retrieved responses could potentially influence downstream processing

General mitigation guidance

Mitigation generally focuses on treating registry manifests and redirect responses as untrusted input.

Common defensive patterns include:

  • Restricting downloads to explicitly trusted registry hosts
  • Allowing only expected URL schemes and redirect destinations
  • Revalidating every redirect rather than trusting the initial URL
  • Blocking loopback, link-local, private, reserved, and cloud-metadata address ranges
  • Resolving hostnames safely and accounting for DNS rebinding
  • Disabling automatic redirects when they are not required
  • Separating model-download services from sensitive internal networks
  • Running the service with minimal network permissions and cloud identity privileges
  • Applying outbound proxy or egress policies that deny access to metadata and administrative endpoints

How teams detect issues like this

Organizations can look for SSRF risks through:

  • Static analysis of HTTP clients that follow redirects without destination validation
  • Code review checks for registry, manifest, and URL fields treated as trusted
  • Tests covering redirects to loopback, private, link-local, and metadata addresses
  • Network monitoring for unexpected outbound requests from Ollama processes
  • Egress policies and proxy logs that identify access to internal or cloud metadata services
  • Automated security review tools that flag unvalidated server-side URL fetching

Sources

SourceLink
github.comgithub.com/ollama/ollama
github.comgithub.com/ollama/ollama/blob/v0.33.2/x/transfer/download.go
github.comgithub.com/ollama/ollama/issues/17041
vulncheck.comvulncheck.com/advisories/ollama-0.30.0-through-0.33.2-ssrf-via-cross-host-tensor-blob-redirect

Frequently asked

questions

It can be exploitable through a model pull request when an attacker can control or influence the registry metadata used by Ollama. Direct access to internal services is not necessarily required.

The described scenario does not require authentication to Ollama if the attacker can cause a vulnerable model or registry manifest to be pulled. Deployment-specific controls may change that exposure.

Treat redirect locations as untrusted, validate every redirect against trusted destinations, block sensitive network ranges, and avoid unnecessary automatic redirect following.

Combine strict URL validation with outbound network restrictions, least-privilege service identities, private-network isolation, and automated tests for SSRF-oriented redirect cases.

Find out what's already
exploitable in your codebase.