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.
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 |
Do you use Ollama? You're affected.
How severe is it?
What is the attack surface?
What should I do?
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.
What does CISA's SSVC say?
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:
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
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
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 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-2026-46339 10.0 9router: unauthenticated RCE exposes LLM API keys
Same package: ollama CVE-2026-42249 9.8 Ollama: path traversal + unsigned update = silent RCE
Same package: ollama CVE-2025-63389 9.8 ollama: Missing Auth allows unauthenticated access
Same package: ollama CVE-2026-42248 9.8 Ollama: silent auto-update bypasses signature check on Windows
Same package: ollama CVE-2026-7482 9.1 Ollama: heap OOB read leaks API keys and chat data
Same package: ollama