CVE-2026-103663 Path Traversal leading to Remote Code Execution in Ollama
Unauthenticated attackers can exploit path traversal in the pull endpoint to write malicious binaries, leading to remote code execution as root on restart.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-103663?
CVE-2026-103663 is a medium-severity path traversal vulnerability in Ollama, published on 8 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2026-103663?
How do I fix CVE-2026-103663?
No fix has been published for CVE-2026-103663 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-103663 being exploited?
There is no known exploitation of CVE-2026-103663 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-w8p2-phwr-px3r.