CVE-2026-103663: Ollama: path traversal in /api/pull enables root RCE

UNKNOWN
Published October 8, 2026
CISO Take

Ollama versions before 0.35.0 contain a path traversal flaw in the /api/pull endpoint: the server does not properly validate layer digests, so an unauthenticated remote attacker can write a malicious file outside the model store. Where the server process can write to /usr/lib/ollama (the default in most Ollama Docker images), the planted file is loaded on the next restart and runs as root, giving full remote code execution on the inference host. No CVSS, EPSS, KEV or SSVC data is published yet and no public exploit or Nuclei template is known, so exploitation likelihood is unquantified, but the attack needs no credentials and Ollama is commonly exposed on internal networks and sometimes the internet. Treat any Ollama instance reachable beyond localhost as high priority. Upgrade to 0.35.0 or later, restrict network access to the Ollama API port (11434) to trusted callers, and make /usr/lib/ollama read-only for the server process until you have patched.

Sources:NVDcert.plollama.comATLAS

What is the risk?

Risk is high for any reachable Ollama deployment, but it cannot be scored precisely yet. Severity, CVSS and EPSS are not published, and there is no known public exploit, KEV listing or SSVC decision. Factors that raise the risk: the attack is remote and unauthenticated, the target is a single HTTP endpoint, and the default Docker images have the writable directory that turns the file write into root code execution. The code execution only fires on a server restart, which adds a delay but is easy to trigger or simply wait for (updates, crashes, host reboots). Exposure depends on whether the API is bound beyond localhost, since Ollama has no built-in authentication. Confidence in this assessment: MEDIUM, based on the NVD description and the cert.pl advisory reference.

How does the attack unfold?

Initial Access
Attacker sends an unauthenticated /api/pull request with a path traversal sequence as the layer digest to an exposed Ollama server.
AML.T0049
Arbitrary File Write
digestToPath fails to validate the digest, so a malicious binary is written outside the model store into /usr/lib/ollama.
Execution
On the next server restart the planted file is loaded and executed, running code as root.
AML.T0112
Impact
Attacker controls the inference host and can steal models, prompts and secrets or pivot into connected systems.

What systems are affected?

PackageEcosystemVulnerable RangePatched
Ollamapip—No patch
184.7K1.8K dependentsPushed 7d ago19% patched~29d to patchFull package profile →

Do you use Ollama? You're affected.

How severe is it?

CVSS 3.1
N/A
EPSS
0.7%
chance of exploitation in 30 days
Higher than 54% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Moderate

What should I do?

1 step
  1. 1) Upgrade Ollama to 0.35.0 or later and rebuild or redeploy container images from the patched base. 2) Do not expose port 11434 to untrusted networks; bind to 127.0.0.1 or place a reverse proxy with authentication and an allowlist in front. 3) Run the container as a non-root user and mount /usr/lib/ollama read-only, with the model store as the only writable volume. 4) Detection: review access logs for POST /api/pull requests with digest values containing '../', encoded traversal sequences or absolute paths. Look for unexpected new or modified files in /usr/lib/ollama and outside the model directory, and for unexplained child processes after Ollama restarts. 5) If you have unpatched exposed instances, check for unexpected files in the library directory before restarting, and rebuild the host or container from a clean image if compromise is suspected. 6) Review the cert.pl advisory for further vendor-confirmed details.

What does CISA's SSVC say?

DecisionTrack
Exploitationnone
AutomatableNo
Technical Impacttotal

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15-Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6-AI system operation and monitoring
NIST AI RMF
MANAGE 4.1-Post-deployment AI system monitoring and incident response
OWASP LLM Top 10
LLM03-Supply Chain

Frequently Asked Questions

What is CVE-2026-103663?

Ollama versions before 0.35.0 contain a path traversal flaw in the /api/pull endpoint: the server does not properly validate layer digests, so an unauthenticated remote attacker can write a malicious file outside the model store. Where the server process can write to /usr/lib/ollama (the default in most Ollama Docker images), the planted file is loaded on the next restart and runs as root, giving full remote code execution on the inference host. No CVSS, EPSS, KEV or SSVC data is published yet and no public exploit or Nuclei template is known, so exploitation likelihood is unquantified, but the attack needs no credentials and Ollama is commonly exposed on internal networks and sometimes the internet. Treat any Ollama instance reachable beyond localhost as high priority. Upgrade to 0.35.0 or later, restrict network access to the Ollama API port (11434) to trusted callers, and make /usr/lib/ollama read-only for the server process until you have patched.

Is CVE-2026-103663 actively exploited?

No confirmed active exploitation of CVE-2026-103663 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-103663?

1) Upgrade Ollama to 0.35.0 or later and rebuild or redeploy container images from the patched base. 2) Do not expose port 11434 to untrusted networks; bind to 127.0.0.1 or place a reverse proxy with authentication and an allowlist in front. 3) Run the container as a non-root user and mount /usr/lib/ollama read-only, with the model store as the only writable volume. 4) Detection: review access logs for POST /api/pull requests with digest values containing '../', encoded traversal sequences or absolute paths. Look for unexpected new or modified files in /usr/lib/ollama and outside the model directory, and for unexplained child processes after Ollama restarts. 5) If you have unpatched exposed instances, check for unexpected files in the library directory before restarting, and rebuild the host or container from a clean image if compromise is suspected. 6) Review the cert.pl advisory for further vendor-confirmed details.

What systems are affected by CVE-2026-103663?

This vulnerability affects the following AI/ML architecture patterns: Model serving, Self-hosted LLM inference, Containerized AI deployments, Local/edge LLM runtimes, RAG pipelines backed by Ollama, Agent frameworks using Ollama as backend.

What is the CVSS score for CVE-2026-103663?

No CVSS score has been assigned yet.

What is the AI security impact?

Affected AI Architectures

Model servingSelf-hosted LLM inferenceContainerized AI deploymentsLocal/edge LLM runtimesRAG pipelines backed by OllamaAgent frameworks using Ollama as backend

MITRE ATLAS Techniques

AML.T0049Exploit Public-Facing Application
AML.T0112Machine Compromise

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 4.1
OWASP LLM Top 10: LLM03

What are the technical details?

Original Advisory

Ollama is vulnerable to path traversal in the `/api/pull` endpoint due to insufficient validation of layer digests by the `digestToPath` function. An unauthenticated remote attacker can specify a path traversal sequence as a layer digest, causing a malicious binary to be written outside the model store.  Critically if the server process has write access to `/usr/lib/ollama` (the default in most Ollama Docker images), an attacker can write the malicious file to that directory. On the next server restart, the file is loaded and executed, resulting in remote code execution as root. This issue was fixed in version 0.35.0.

Exploitation Scenario

An attacker scans for exposed Ollama API ports and finds an unpatched instance running the default Docker image. They send a crafted /api/pull request whose layer digest contains a path traversal sequence, causing the server to write an attacker-controlled binary into /usr/lib/ollama. They then wait for the next restart (a routine update, a crash they trigger, or a host reboot). On startup the server loads the planted file and executes it as root. The attacker now controls the inference host, can steal model files, prompts and credentials, and pivots to connected RAG databases and internal services.

Weaknesses (CWE)

CWE-23 — Relative Path Traversal: The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.

  • [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
  • [Implementation] Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked. Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59). This includes: realpath() in C getCanonicalPath() in Java GetFullPath() in ASP.NET realpath() or abs_path() in Perl realpath() in PHP

Source: MITRE CWE corpus.

Timeline

Published
October 8, 2026
Last Modified
October 8, 2026
First Seen
October 8, 2026

Related Vulnerabilities