CVE-2024-39719: Ollama: file existence oracle via api/create errors
HIGH PoC AVAILABLE CISA: TRACK*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.
Risk Assessment
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.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| ollama | pip | — | No patch |
Do you use ollama? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Upgrade Ollama to a version > 0.3.14 when a patched release is available.
-
Immediately place Ollama behind an authenticated reverse proxy (nginx, Caddy, Traefik) — never expose it directly to the internet or untrusted networks.
-
Block or restrict the /api/create endpoint at the network perimeter for environments where model creation is not required.
-
Audit firewall/cloud security group rules — Ollama binds to 0.0.0.0:11434 by default.
-
Monitor access logs for high-volume or systematic requests to /api/create with varied path parameters.
-
Rotate any credentials stored in paths that may have been probed if exposure is confirmed.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
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 44.51%.
Technical Details
NVD Description
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)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N References
- oligo.security/blog/more-models-more-probllms Exploit 3rd Party
- github.com/J1ezds/Vulnerability-Wiki-page Exploit
- github.com/PuddinCat/GithubRepoSpider Exploit
- github.com/Threekiii/Awesome-POC Exploit
- github.com/dansarmiento/ollama_sql_runner Exploit
- github.com/fkie-cad/nvd-json-data-feeds Exploit
- github.com/liuyu771/GithubRepoSpider Exploit
- github.com/plzheheplztrying/cve_monitor Exploit
- github.com/srcx404/CVE-2024-39719 Exploit
- github.com/wowtalon/LLM-Security Exploit
Timeline
Related Vulnerabilities
CVE-2025-63389 9.8 ollama: Missing Auth allows unauthenticated access
Same package: ollama CVE-2026-44007 9.1 vm2: sandbox escape via nesting:true enables RCE
Same package: ollama CVE-2026-7482 9.1 Ollama: heap OOB read leaks API keys and chat data
Same package: ollama CVE-2024-37032 8.8 Ollama: path traversal enables RCE via model blob API
Same package: ollama CVE-2024-39720 8.2 Ollama: OOB read in GGUF parser enables remote DoS
Same package: ollama
AI Threat Alert