Ollama before 0.1.34 is vulnerable to a path traversal attack via the model pull mechanism (CVE-2024-37032). When pulling a model, the digest field in OCI manifests is not validated, allowing an attacker to inject path traversal sequences to write arbitrary files on the server. This module starts a rogue OCI registry that serves two models. The first pull writes a malicious shared library and /etc/ld.so.preload via path traversal (a sacrificial first layer absorbs the digest verification failure so the remaining files persist). The second pull registers a valid model so /api/chat can spawn the llama.cpp runner process, which triggers the dynamic linker to load the malicious library via ld.so.preload. The library constructor forks, cleans up ld.so.preload, and executes the payload in the child process. The default Ollama Docker image runs as root with the API bound to 0.0.0.0:11434, making this a direct unauthenticated RCE.
Exploit database
Vulnerability
CVE-2024-37032
Vulnerability details
- Score
- 8.8
- Severity
- high
CVSS 3.1 · CISA-ADP
Vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDescription
Ollama before 0.1.34 does not validate the format of the digest (sha256 with 64 hex digits) when getting the model path, and thus mishandles the TestGetBlobsPath test cases such as fewer than 64 hex digits, more than 64 hex digits, or an initial ../ substring.
CVE ProgramExploit source choices
7 sourcesOllama Model Registry Path Traversal RCE
2024-05-05ollama_rce_cve_2024_37032.rb
bi0x/cve-2024-37032
Path traversal in Ollama with rogue registry server
2024-06-267 files · 56 stars
itzsh4dowxz/cve-2024-37032-poc
CVE-2024-37032 (Probllama) PoC for Ollama ≤0.1.33: path traversal and arbitrary file write via model digest handling, leading to automated privilege escalation.
2026-05-1914 files · 9 stars
pankass/cve-2024-37032_cve-2024-45436
CVE-2024-45436
2024-10-214 files · 8 stars
ahboon/cve-2024-37032-scanner
CVE-2024-37032 scanner
2024-07-102 files · 1 stars
catgirls-corporation/ollama_on-prem
catgirls-corporation/ollama_on-prem source repository
2024-06-196 files · 0 stars
dansarmiento/ollama_sql_runner
dansarmiento/ollama_sql_runner source repository
2025-08-1110 files · 0 stars