{"schemaVersion":3,"id":"CVE-2026-103663","aliases":[],"status":"published","duplicateOf":null,"title":"Path Traversal leading to Remote Code Execution in Ollama","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.\n\nCritically 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.\n\n\nThis issue was fixed in version 0.35.0.","dates":{"published":"2026-10-08T13:19:04.819Z","modified":"2026-10-08T14:04:14.270Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.4,"severity":"critical","version":"4.0","versionLabel":"v4.0","source":"NVD","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":6.9,"severity":"medium","vector":"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","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":9.4,"severity":"critical","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00714,"percentile":0.53157,"severity":"low","asOf":"2026-10-22T00:00:00.000Z","change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[{"date":"2026-10-09T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.00714,"percentile":0.53157}],"last30":[{"date":"2026-10-09T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00714,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.00714,"percentile":0.53157}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-23","name":"Relative Path Traversal","description":"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.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/23.html"},{"id":"CWE-913","name":"Improper Control of Dynamically-Managed Code Resources","description":"The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/913.html"}],"affected":[{"vendor":"ollama","product":"ollama","name":"ollama","label":"ollama","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 0.34.2, < 0.35.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.34.2, < 0.35.0","eol":null,"hubHref":"/vendor/ollama/ollama"}],"affectedCount":1,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://cert.pl/en/posts/2026/10/CVE-2026-103663/","label":"cert.pl/en/posts/2026/10/CVE-2026-103663/","hostname":"cert.pl","tags":["Third Party Advisory"]},{"url":"https://ollama.com/","label":"ollama.com","hostname":"ollama.com","tags":["Product"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-10-08T13:19:04.819Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-10-08T14:04:14.270Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-22T21:49:24.267Z","stale":false,"partial":false}}