Path Traversal leading to Remote Code Execution in Ollama
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-103663
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 01:19 UTC · Revision 1
Source evidence
Path Traversal leading to Remote Code Execution in Ollama
core-osv · Original sourcePublished 8 Oct 2026, 13:19 UTC
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.
osv:CVE-2026-103663
Complete source record
{
"id": "7316c4dc1ad9a92474d8d0c58bfa1799ab505ce8ce10d3a3876a62ff8c07d682",
"url": "https://osv.dev/vulnerability/CVE-2026-103663",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Path Traversal leading to Remote Code Execution in Ollama",
"summary": "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.",
"evidence": "osv:CVE-2026-103663",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-103663",
"aliases": [
"CVE-2026-103663"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/ollama/ollama",
"type": "GIT",
"events": [
{
"introduced": "dfabde4539e42ba1e1eab50a3a50b88aea7958a0"
},
{
"fixed": "cc4069396f3ad2c370c53eed2e4a42ac13adab84"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0.34.2"
},
{
"fixed": "0.35.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
}
]
}
}
],
"versions": [
"v0.34.3-rc1",
"v0.34.3",
"v0.35.0-rc0",
"v0.34.4-rc1",
"v0.34.4",
"v0.34.4-rc0",
"v0.34.3-rc0",
"v0.34.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-103663.json"
}
}
],
"modified": "2026-10-28T02:30:41.225826189Z",
"provider": "osv",
"references": [
"https://ollama.com/",
"https://cert.pl/en/posts/2026/10/CVE-2026-103663/",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/103xxx/CVE-2026-103663.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-103663",
"https://github.com/ollama/ollama"
],
"provider_metadata": {
"cwe_ids": [
"CWE-23",
"CWE-913"
],
"cna_assigner": "CERT-PL",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/103xxx/CVE-2026-103663.json"
}
},
"related_cves": [
{
"value": "CVE-2026-103663",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 509000,
"published_at": "2026-10-08T13:19:04.819+00:00"
}