CVE-2024-37032: Ollama: path traversal enables RCE via model blob API

HIGH ACTIVELY EXPLOITED PoC AVAILABLE
Published May 31, 2024
CISO Take

Ollama before 0.1.34 contains a path traversal flaw (CWE-22) in its model blob API that enables remote code execution with low privileges and no user interaction required. Any team running Ollama—locally or network-exposed—must upgrade to 0.1.34+ immediately. If Ollama is accessible beyond localhost, treat it as potentially compromised and audit access logs for '../' patterns in blob requests.

What is the risk?

High risk (CVSS 8.8). Network-accessible, low-complexity, no user interaction required—trivially exploitable by any user with API access. Ollama's default port (11434) is frequently left open on internal networks or exposed externally in development environments. A public exploit write-up ('Probllama' via Vicarius) is available, materially lowering the bar for exploitation. No active KEV listing, but public PoC makes exploitation highly likely.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Ollama pip No patch
174.6K 1.6K dependents Pushed 3d ago 12% patched ~0d to patch Full package profile →

Do you use Ollama? You're affected.

How severe is it?

CVSS 3.1
8.8 / 10
EPSS
89.6%
chance of exploitation in 30 days
Higher than 100% of all CVEs
Exploitation Status
Actively Exploited
Sophistication
Trivial
Exploitation Confidence
high
CISA KEV (active exploitation confirmed)
EPSS exploit prediction: 90%
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI None
S Unchanged
C High
I High
A High

What should I do?

1 step
  1. 1) Upgrade Ollama to 0.1.34+ immediately—this is the only complete fix. 2) If patching is delayed, restrict API to localhost by binding to 127.0.0.1 and block port 11434 at the network perimeter. 3) Run Ollama in a container with a read-only root filesystem and minimal volume mounts to limit blast radius. 4) Search access logs for blob path requests where the digest field contains '../' or strings not matching the pattern [a-f0-9]{64}. 5) Audit who has network access to Ollama—by default it has no authentication layer.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.9.4 - Information security for AI systems
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain effectiveness of AI risk or impact mitigations are planned
OWASP LLM Top 10
LLM05 - Supply Chain Vulnerabilities

Frequently Asked Questions

What is CVE-2024-37032?

Ollama before 0.1.34 contains a path traversal flaw (CWE-22) in its model blob API that enables remote code execution with low privileges and no user interaction required. Any team running Ollama—locally or network-exposed—must upgrade to 0.1.34+ immediately. If Ollama is accessible beyond localhost, treat it as potentially compromised and audit access logs for '../' patterns in blob requests.

Is CVE-2024-37032 actively exploited?

Yes, CVE-2024-37032 is confirmed actively exploited and listed in CISA Known Exploited Vulnerabilities catalog.

How to fix CVE-2024-37032?

1) Upgrade Ollama to 0.1.34+ immediately—this is the only complete fix. 2) If patching is delayed, restrict API to localhost by binding to 127.0.0.1 and block port 11434 at the network perimeter. 3) Run Ollama in a container with a read-only root filesystem and minimal volume mounts to limit blast radius. 4) Search access logs for blob path requests where the digest field contains '../' or strings not matching the pattern [a-f0-9]{64}. 5) Audit who has network access to Ollama—by default it has no authentication layer.

What systems are affected by CVE-2024-37032?

This vulnerability affects the following AI/ML architecture patterns: local LLM inference, model serving, agent frameworks, self-hosted LLM APIs, AI development environments.

What is the CVSS score for CVE-2024-37032?

CVE-2024-37032 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 89.63%.

What is the AI security impact?

Affected AI Architectures

local LLM inferencemodel servingagent frameworksself-hosted LLM APIsAI development environments

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0025 Exfiltration via Cyber Means
AML.T0040 AI Model Inference API Access
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.9.4
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM05

What are the technical details?

Original Advisory

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.

Exploitation Scenario

An attacker with network access to Ollama's API (default port 11434) crafts a request to the blob endpoint using a malformed digest containing a path traversal sequence—e.g., 'sha256:../../../etc/cron.d/pwned'. Since Ollama does not validate the digest format, it resolves this to an arbitrary filesystem path. The attacker writes a cron job, an SSH authorized_keys entry, or a reverse shell payload to the host, achieving persistent access to the machine running the LLM inference server. In enterprise environments, this host often has broad internal network access and stores sensitive model weights or API credentials.

Weaknesses (CWE)

CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

  • [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
  • [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Timeline

Published
May 31, 2024
Last Modified
May 1, 2025
First Seen
May 31, 2024

Related Vulnerabilities