CVE-2026-103663: Ollama: path traversal in /api/pull enables root RCE
UNKNOWNOllama 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.
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?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Ollama | pip | — | No patch |
Do you use Ollama? You're affected.
How severe is it?
What should I do?
1 step1) 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?
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:
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
MITRE ATLAS Techniques
AML.T0049Exploit Public-Facing ApplicationAML.T0112Machine CompromiseCompliance Controls Affected
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-23Relative Path TraversalCWE-23Relative Path TraversalCWE-913Improper Control of Dynamically-Managed Code ResourcesCWE-913Improper Control of Dynamically-Managed Code ResourcesCWE-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
Related Vulnerabilities
CVE-2026-4633910.09router: unauthenticated RCE exposes LLM API keys
Same package: ollamaCVE-2026-422499.8Ollama: path traversal + unsigned update = silent RCE
Same package: ollamaCVE-2026-422489.8Ollama: silent auto-update bypasses signature check on Windows
Same package: ollamaCVE-2025-633899.8ollama: Missing Auth allows unauthenticated access
Same package: ollamaCVE-2026-74829.1Ollama: heap OOB read leaks API keys and chat data
Same package: ollama