CVE-2024-37032: Github.com/ollama/ollama Ollama Does Not Validate The Vulnerability
MODERATECVE-2024-37032 is a MODERATE ollama does not validate the vulnerability (General Security Weakness) affecting Github.com/ollama/ollama libraries in the Go ecosystem. The issue involves ollama does not validate the format of the digest (sha256 with 64 hex digits). Remediation is available by upgrading affected packages to version 0.1.34.
CVE-2024-37032 at a Glance
How to Fix CVE-2024-37032
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.34
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-37032, 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.34), 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 General Security Weakness. 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-37032 Affected Github.com/ollama/ollama Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ollama/ollama
|
Go |
< 0.1.34
|
0.1.34
|
References
Frequently Asked Questions
What is CVE-2024-37032?
Which Github.com/ollama/ollama versions are affected?
What version fixes CVE-2024-37032?
Is github.com/ollama/ollama affected?
What CWE is associated with CVE-2024-37032?
How can I check Go dependencies for CVE-2024-37032?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8hqg-whrw-pv92",
"modified" : "2024-09-06T21:37:30Z",
"published" : "2024-05-31T06:30:27Z",
"aliases" : [ "CVE-2024-37032" ],
"summary" : "Ollama does not validate the format of the digest (sha256 with 64 hex digits)",
"details" : "Ollama before 0.1.34 does not validate the format of the digest (sha256 with 64 hex digits) when getting the model path, and thus mishandles the TestGetBlobsPath test cases such as fewer than 64 hex digits, more than 64 hex digits, or an initial `../` substring.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ollama/ollama"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.34"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-37032"
}, {
"type" : "WEB",
"url" : "https://github.com/ollama/ollama/pull/4175"
}, {
"type" : "WEB",
"url" : "https://github.com/ollama/ollama/commit/2a21363bb756a7341d3d577f098583865bd7603f"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-8hqg-whrw-pv92"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ollama/ollama"
}, {
"type" : "WEB",
"url" : "https://github.com/ollama/ollama/blob/adeb40eaf29039b8964425f69a9315f9f1694ba8/server/modelpath_test.go#L41-L58"
}, {
"type" : "WEB",
"url" : "https://github.com/ollama/ollama/compare/v0.1.33...v0.1.34"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-2901"
}, {
"type" : "WEB",
"url" : "https://www.vicarius.io/vsociety/posts/probllama-in-ollama-a-tale-of-a-yet-another-rce-vulnerability-cve-2024-37032"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-02T22:32:29Z",
"nvd_published_at" : "2024-05-31T04:15:09Z"
}
}