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:H

Description

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 Program

Exploit source choices

7 sources
Ollama Model Registry Path Traversal RCE
MSF-linux--http--ollama_rce_cve_2024_37032MetasploitLinux / remotePreferred

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.

2024-05-05ollama_rce_cve_2024_37032.rb
bi0x/cve-2024-37032
GH-d50068d59937e24ae0233dfeb90af80cGitHubUnofficial GitHub source

Path traversal in Ollama with rogue registry server

2024-06-267 files · 56 stars
itzsh4dowxz/cve-2024-37032-poc
GH-d061647ef9f55c9c85b7ea86610ea5b5GitHubUnofficial GitHub source

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
catgirls-corporation/ollama_on-prem
GH-f12408bde5c1bc98fa02b995548dd779GitHubUnofficial GitHub source

catgirls-corporation/ollama_on-prem source repository

2024-06-196 files · 0 stars
dansarmiento/ollama_sql_runner
GH-2eb88f4dab20b7790709fc1c7c9850f2GitHubUnofficial GitHub source

dansarmiento/ollama_sql_runner source repository

2025-08-1110 files · 0 stars