Skip to content
OpenAdvisories
Critical · 9.4 Public exploit CVE-2026-103663 EUVD-2026-94962GHSA-w8p2-phwr-px3r

Path Traversal leading to Remote Code Execution in Ollama

Published Oct 8, 2026 · Updated Oct 8, 2026 · Assigned by CERT-PL

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

VendorProductAffectedFixed
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 1

References