/

CVE-2026-108836

Severity:

HIGH RISK

(7.3)

Server-Side Request Forgery (CWE-918) in Ollama Pull API

CVE-2026-108836

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized server-side network access

Severity:

HIGH RISK

(7.3)

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

A server-side request forgery vulnerability in Ollama's Pull API allows attacker-controlled input to influence server-side network requests. When the remotely reachable API accepts a crafted model name or related value, an attacker may cause the Ollama server to contact unintended internal or external resources.

A server-side request forgery vulnerability in Ollama's Pull API allows attacker-controlled input to influence server-side network requests. When the remotely reachable API accepts a crafted model name or related value, an attacker may cause the Ollama server to contact unintended internal or external resources.

Affected context

The issue occurs in Ollama deployments using the Pull API and the model-name validation logic in types/model/name.go. Risk is higher when the API is remotely accessible and validation permits user-controlled values to influence request destinations or resource identifiers without adequately restricting their network interpretation.

The issue occurs in Ollama deployments using the Pull API and the model-name validation logic in types/model/name.go. Risk is higher when the API is remotely accessible and validation permits user-controlled values to influence request destinations or resource identifiers without adequately restricting their network interpretation.

Exploit preconditions

  • Attack surface: The remotely accessible Ollama Pull API
  • Required access: Network access to an exposed Pull API; authentication requirements depend on deployment configuration
  • Trigger point: Processing and validation of attacker-controlled model input
  • Why exploitation is possible: Insufficient validation can allow input to influence server-side requests to destinations that were not intended by the service operator
  • Attack surface: The remotely accessible Ollama Pull API
  • Required access: Network access to an exposed Pull API; authentication requirements depend on deployment configuration
  • Trigger point: Processing and validation of attacker-controlled model input
  • Why exploitation is possible: Insufficient validation can allow input to influence server-side requests to destinations that were not intended by the service operator

Why this happens

The vulnerability is caused by inadequate validation of input used during Pull API processing. If model-related values are interpreted in a way that permits server-side request destinations or network locations outside an approved set, the application may be induced to make requests on an attacker's behalf.

This behavior maps to CWE-918: Server-Side Request Forgery, where externally influenced input causes a server to issue requests to unintended resources.

The vulnerability is caused by inadequate validation of input used during Pull API processing. If model-related values are interpreted in a way that permits server-side request destinations or network locations outside an approved set, the application may be induced to make requests on an attacker's behalf.

This behavior maps to CWE-918: Server-Side Request Forgery, where externally influenced input causes a server to issue requests to unintended resources.

Potential impact

  • An attacker may access services reachable from the Ollama host
  • Internal network resources or cloud metadata endpoints could be exposed
  • The server could make requests to attacker-controlled external systems
  • Sensitive response data could be disclosed if returned through the API
  • Network segmentation and access-control boundaries could be weakened
  • An attacker may access services reachable from the Ollama host
  • Internal network resources or cloud metadata endpoints could be exposed
  • The server could make requests to attacker-controlled external systems
  • Sensitive response data could be disclosed if returned through the API
  • Network segmentation and access-control boundaries could be weakened

General mitigation guidance

Mitigation generally focuses on reducing trust in user-controlled model identifiers and enforcing explicit outbound request policies.

Common defensive patterns include:

  • Allowlisting permitted model registries, schemes, hosts, and ports
  • Canonicalizing and validating input before any network operation
  • Rejecting ambiguous, embedded, or alternate network address representations
  • Applying outbound egress controls at the host, container, or network layer
  • Blocking access to loopback, link-local, private, and metadata-service addresses unless explicitly required
  • Returning only the minimum necessary upstream response data
  • Running the service with least-privilege network and filesystem permissions

Mitigation generally focuses on reducing trust in user-controlled model identifiers and enforcing explicit outbound request policies.

Common defensive patterns include:

  • Allowlisting permitted model registries, schemes, hosts, and ports
  • Canonicalizing and validating input before any network operation
  • Rejecting ambiguous, embedded, or alternate network address representations
  • Applying outbound egress controls at the host, container, or network layer
  • Blocking access to loopback, link-local, private, and metadata-service addresses unless explicitly required
  • Returning only the minimum necessary upstream response data
  • Running the service with least-privilege network and filesystem permissions

How teams detect issues like this

Organizations can look for SSRF risks through:

  • Static analysis of code paths where request parameters influence URLs, hosts, schemes, or redirects
  • Code review checks for missing allowlists and incomplete private-address filtering
  • API tests covering loopback, private-network, link-local, metadata, alternate-encoding, and redirect cases
  • Egress monitoring for unexpected connections from Ollama processes to internal or unusual external destinations
  • Network policies that deny unnecessary outbound access and alert on blocked requests
  • Automated security review tools that identify user-controlled input reaching HTTP client operations

Organizations can look for SSRF risks through:

  • Static analysis of code paths where request parameters influence URLs, hosts, schemes, or redirects
  • Code review checks for missing allowlists and incomplete private-address filtering
  • API tests covering loopback, private-network, link-local, metadata, alternate-encoding, and redirect cases
  • Egress monitoring for unexpected connections from Ollama processes to internal or unusual external destinations
  • Network policies that deny unnecessary outbound access and alert on blocked requests
  • Automated security review tools that identify user-controlled input reaching HTTP client operations

Sources

SourceLink
github.comgithub.com/aLtEr6/test.git
github.comgithub.com/aLtEr6/test/blob/main/test.pdf
github.comgithub.com/ollama/ollama/
github.comgithub.com/ollama/ollama/commit/dfabde4539e42ba1e1eab50a3a50b88aea7958a0
github.comgithub.com/ollama/ollama/pull/18512
github.comgithub.com/ollama/ollama/releases/tag/v0.34.2
vuldb.comvuldb.com/cve/CVE-2026-108836
vuldb.comvuldb.com/submit/972855
vuldb.comvuldb.com/vuln/416610
vuldb.comvuldb.com/vuln/416610/cti

Frequently asked

questions

Yes. The vulnerability can be triggered through the Pull API when that endpoint is reachable by an attacker and accepts the relevant crafted input.

Not necessarily. The required access depends on the deployment's authentication and network exposure, but the key prerequisite is the ability to submit input to the affected API.

Validate model-related input against a strict allowlist, prevent requests to restricted address ranges, and enforce outbound network policies independent of application validation.

Treat all request destinations derived from API input as untrusted, test SSRF edge cases during development, monitor egress traffic, and apply least-privilege network controls.

Yes. The vulnerability can be triggered through the Pull API when that endpoint is reachable by an attacker and accepts the relevant crafted input.

Not necessarily. The required access depends on the deployment's authentication and network exposure, but the key prerequisite is the ability to submit input to the affected API.

Validate model-related input against a strict allowlist, prevent requests to restricted address ranges, and enforce outbound network policies independent of application validation.

Treat all request destinations derived from API input as untrusted, test SSRF edge cases during development, monitor egress traffic, and apply least-privilege network controls.

Find out what's already
exploitable in your codebase.