Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-39721: n/a

0
High
VulnerabilityCVE-2024-39721cvecve-2024-39721
Published: Thu Oct 31 2024 (10/31/2024, 00:00:00 UTC)
Source: CVE Database V5

Description

An issue was discovered in Ollama before 0.1.34. The CreateModelHandler function uses os.Open to read a file until completion. The req.Path parameter is user-controlled and can be set to /dev/random, which is blocking, causing the goroutine to run infinitely (even after the HTTP request is aborted by the client).

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/28/2026, 04:24:41 UTC

Technical Analysis

CVE-2024-39721 is a denial-of-service vulnerability identified in Ollama versions prior to 0.1.34. The root cause lies in the CreateModelHandler function, which reads a file specified by the user via the req.Path parameter using the os.Open function. Since req.Path is user-controlled and not properly validated, an attacker can specify special device files such as /dev/random. Reading from /dev/random is a blocking operation that waits for sufficient entropy, causing the goroutine handling the request to block indefinitely. Even if the client aborts the HTTP request, the goroutine remains stuck, leading to resource exhaustion and potential denial of service. This vulnerability is classified under CWE-404 (Improper Resource Shutdown or Release). The CVSS v3.1 base score is 7.5, reflecting high severity with network attack vector, low attack complexity, no privileges or user interaction required, and impact limited to availability. No known exploits have been reported, and no official patches have been linked yet. The vulnerability primarily affects the availability of services running vulnerable Ollama versions and can be triggered remotely by unauthenticated attackers.

Potential Impact

The primary impact of CVE-2024-39721 is a denial-of-service condition that can severely disrupt the availability of Ollama services. By causing goroutines to block indefinitely, an attacker can exhaust server resources such as CPU and memory, potentially leading to service crashes or degraded performance. This can interrupt critical operations relying on Ollama, affecting business continuity. Since the vulnerability does not affect confidentiality or integrity, data breaches or unauthorized data modifications are not a concern here. However, the ease of exploitation without authentication and the ability to trigger the issue remotely make it a significant risk for organizations exposing Ollama services to the internet. Large-scale or repeated exploitation could lead to widespread outages and increased operational costs due to recovery efforts.

Mitigation Recommendations

To mitigate CVE-2024-39721, organizations should upgrade Ollama to version 0.1.34 or later where the issue is resolved. In the absence of an immediate patch, implement strict input validation and sanitization on the req.Path parameter to disallow special device files such as /dev/random and other blocking or sensitive system files. Employ rate limiting and request throttling to reduce the impact of repeated exploitation attempts. Monitor application logs and system metrics for signs of goroutine blocking or resource exhaustion. Additionally, consider isolating Ollama services behind firewalls or VPNs to restrict access to trusted users only. Implementing circuit breakers or timeouts on file read operations can also prevent indefinite blocking. Finally, maintain an incident response plan to quickly address denial-of-service conditions if they occur.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2024-06-28T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 699f6c87b7ef31ef0b565f03

Added to database: 2/25/2026, 9:41:27 PM

Last enriched: 2/28/2026, 4:24:41 AM

Last updated: 4/12/2026, 7:54:51 AM

Views: 23

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses