Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Ollama | Ollama | 0.34.2 – < 0.35.0 | 0.35.0 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
striga-ai/CVE-2026-103663 ★ 0 · Oct 19, 2026
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- WID-SEC-2026-3821 Ollama: Schwachstelle ermöglicht Codeausführung BSI CERT-Bund (WID) · Oct 8, 2026
References
- https://cert.pl/en/posts/2026/10/CVE-2026-103663/ third-party-advisory
- https://ollama.com/ product