CVE-2024-39721: ollama · Improper Resource Shutdown or Release
Affects ollamaSource CVE Database V5
Not known to be exploited · CVSS 7.5 High : upgrade to 0.1.34 soon.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 2.6% chance of exploitation in 30 days – higher than 85% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.1.34
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 31 Oct 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade github.com/ollama/ollama to 0.1.34.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Gogithub.com/ollama/ollamapkg:golang/github.com/ollama/ollamaOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
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.
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).