CVE-2024-39719: Ollama: file existence oracle via api/create errors

HIGH PoC AVAILABLE CISA: TRACK*
Published October 31, 2024
CISO Take

Unauthenticated attackers can enumerate any file path on Ollama servers by probing the api/create endpoint — confirmed by distinct error messages. This turns into a reconnaissance primitive for locating credentials, model weights, and configs before follow-on attacks. Immediately restrict the api/create endpoint to authenticated, internal traffic and upgrade past 0.3.14 when a patch ships.

What is the risk?

Practical risk is medium-high despite the 'information disclosure' label. Thousands of Ollama instances are internet-exposed (Shodan-indexed), and the endpoint requires zero credentials and zero complexity. File enumeration enables attackers to map the filesystem for credential files, API keys, or custom model paths — dramatically lowering the cost of follow-on compromise. Organizations running Ollama in containerized AI stacks or on shared inference hosts face elevated exposure.

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
7.5 / 10
EPSS
4.1%
chance of exploitation in 30 days
Higher than 89% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Public PoC indexed (trickest/cve)
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 None
UI None
S Unchanged
C High
I None
A None

What should I do?

6 steps
  1. Upgrade Ollama to a version > 0.3.14 when a patched release is available.

  2. Immediately place Ollama behind an authenticated reverse proxy (nginx, Caddy, Traefik) — never expose it directly to the internet or untrusted networks.

  3. Block or restrict the /api/create endpoint at the network perimeter for environments where model creation is not required.

  4. Audit firewall/cloud security group rules — Ollama binds to 0.0.0.0:11434 by default.

  5. Monitor access logs for high-volume or systematic requests to /api/create with varied path parameters.

  6. Rotate any credentials stored in paths that may have been probed if exposure is confirmed.

What does CISA's SSVC say?

Decision Track*
Exploitation poc
Automatable Yes
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
Art. 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.5 - Logging and monitoring of AI systems
NIST AI RMF
MEASURE 2.5 - Privacy risks enumerated in risk or impact assessment
OWASP LLM Top 10
LLM02:2025 - Sensitive Information Disclosure

Frequently Asked Questions

What is CVE-2024-39719?

Unauthenticated attackers can enumerate any file path on Ollama servers by probing the api/create endpoint — confirmed by distinct error messages. This turns into a reconnaissance primitive for locating credentials, model weights, and configs before follow-on attacks. Immediately restrict the api/create endpoint to authenticated, internal traffic and upgrade past 0.3.14 when a patch ships.

Is CVE-2024-39719 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2024-39719, increasing the risk of exploitation.

How to fix CVE-2024-39719?

1. Upgrade Ollama to a version > 0.3.14 when a patched release is available. 2. Immediately place Ollama behind an authenticated reverse proxy (nginx, Caddy, Traefik) — never expose it directly to the internet or untrusted networks. 3. Block or restrict the /api/create endpoint at the network perimeter for environments where model creation is not required. 4. Audit firewall/cloud security group rules — Ollama binds to 0.0.0.0:11434 by default. 5. Monitor access logs for high-volume or systematic requests to /api/create with varied path parameters. 6. Rotate any credentials stored in paths that may have been probed if exposure is confirmed.

What systems are affected by CVE-2024-39719?

This vulnerability affects the following AI/ML architecture patterns: model serving, local LLM inference, self-hosted AI infrastructure, containerized AI stacks.

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

CVE-2024-39719 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 4.09%.

What is the AI security impact?

Affected AI Architectures

model servinglocal LLM inferenceself-hosted AI infrastructurecontainerized AI stacks

MITRE ATLAS Techniques

AML.T0006 Active Scanning
AML.T0007 Discover AI Artifacts
AML.T0037 Data from Local System
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Art. 15
ISO 42001: A.6.2.5
NIST AI RMF: MEASURE 2.5
OWASP LLM Top 10: LLM02:2025

What are the technical details?

Original Advisory

An issue was discovered in Ollama through 0.3.14. File existence disclosure can occur via api/create. When calling the CreateModel route with a path parameter that does not exist, it reflects the "File does not exist" error message to the attacker, providing a primitive for file existence on the server.

Exploitation Scenario

An attacker discovers an internet-facing Ollama instance via Shodan (query: 'port:11434 ollama'). They script a loop sending POST requests to /api/create with a 'path' field cycling through known sensitive paths: /root/.ssh/id_rsa, /etc/passwd, /root/.ollama/config.json, /home/user/.aws/credentials, /app/.env. The distinct 'File does not exist' error vs. a model-creation attempt error confirms which files are present on the host. With this map, the attacker crafts a targeted follow-on attack using a separate path traversal or SSRF vulnerability to exfiltrate the confirmed files.

Weaknesses (CWE)

CWE-209 — Generation of Error Message Containing Sensitive Information: The product generates an error message that includes sensitive information about its environment, users, or associated data.

  • [Implementation] Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
  • [Implementation] Handle exceptions internally and do not display errors containing potentially sensitive information to a user.

Source: MITRE CWE corpus.

CVSS Vector

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

Timeline

Published
October 31, 2024
Last Modified
May 13, 2025
First Seen
October 31, 2024

Related Vulnerabilities