CVE-2024-39720: Github.com/ollama/ollama Ollama Out-of-bounds Read Vulnerability
HIGHCVE-2024-39720 is a HIGH (CVSS 8.2) ollama out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Github.com/ollama/ollama libraries in the Go ecosystem. The issue involves ollama out-of-bounds read. Remediation is available by upgrading affected packages to version 0.1.46.
CVE-2024-39720 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H).
How to Fix CVE-2024-39720
To remediate this vulnerability, upgrade all affected Github.com/ollama/ollama dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/ollama/ollama to 0.1.46
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ollama/ollama
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-39720, inspect your project dependencies for Github.com/ollama/ollama:
inspect dependencies for github.com/ollama/ollama
Analyze the terminal output to locate any version of Github.com/ollama/ollama in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.46), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Github.com/ollama/ollama, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-39720 Affected Github.com/ollama/ollama Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ollama/ollama
|
Go |
< 0.1.46
|
0.1.46
|
References
Frequently Asked Questions
What is CVE-2024-39720?
Which Github.com/ollama/ollama versions are affected?
What version fixes CVE-2024-39720?
Is github.com/ollama/ollama affected?
What is the CVSS score of CVE-2024-39720?
What CWE is associated with CVE-2024-39720?
How can I check Go dependencies for CVE-2024-39720?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-95j2-w8x7-hm88",
"modified" : "2024-12-12T18:01:01Z",
"published" : "2024-10-31T21:31:45Z",
"aliases" : [ "CVE-2024-39720" ],
"summary" : "Ollama Out-of-bounds Read",
"details" : "An issue was discovered in Ollama before 0.1.46. An attacker can use two HTTP requests to upload a malformed GGUF file containing just 4 bytes starting with the GGUF custom magic header. By leveraging a custom Modelfile that includes a FROM statement pointing to the attacker-controlled blob file, the attacker can crash the application through the CreateModel route, leading to a segmentation fault (signal SIGSEGV: segmentation violation).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ollama/ollama"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.46"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-39720"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ollama/ollama"
}, {
"type" : "WEB",
"url" : "https://github.com/ollama/ollama/compare/v0.1.45...v0.1.46#diff-782c2737eecfa83b7cb46a77c8bdaf40023e7067baccd4f806ac5517b4563131L417"
}, {
"type" : "WEB",
"url" : "https://oligo.security/blog/more-models-more-probllms"
}, {
"type" : "WEB",
"url" : "https://oligosecurity.webflow.io/blog/more-models-more-probllms"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-3245"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-04T23:22:24Z",
"nvd_published_at" : "2024-10-31T20:15:04Z"
}
}