CVE-2024-37032 in the critical feed json
Ollama does not validate the format of the digest (sha256 with 64 hex digits)
published 2024-05-31 2 y ago modified 2026-09-10 1 mo ago also GHSA-8hqg-whrw-pv92 , GO-2024-2901 , EUVD-2024-1525
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 89.6%
- EPSS 89.6% chance of exploitation in 30 days, percentile 99.7%
- public exploits
- 1
- Metasploit, plus a Nuclei check
Summary
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.
Patch / fix
- go github.com/ollama/ollama 0.1.34
- ollama ollama 0.1.34
- govulncheck-vulndb openSUSE Tumbleweed 0.0.20241213T205935-1.1
opensuse advisories openSUSE-SU-2024:14599-1
- github.com/ollama/ollama@2a21363 commit
- github.com/ollama/ollama#4175 pull request
Timeline
- First public exploit (Metasploit exploit/linux/http/ollama_rce_cve_2024_37032)
- Published
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
89.63% chance of exploitation in the next 30 days, higher than 99.7% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- Metasploit exploit/linux/http/ollama_rce_cve_2024_37032 Ollama Model Registry Path Traversal RCE metasploit exploit, excellent rank, 2024-05-05
- Nuclei template Ollama - Remote Code Execution nuclei detection template
- vicarius.io https://www.vicarius.io/vsociety/posts/probllama-in-ollama-a-tale-of-a-yet-another-rce-vulnerability-cve-2024-37032 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/ollama/ollama | <0.1.34 |
0.1.34 |
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/ollama/ollama/pull/4175
web, issue-tracking, patch
-
github.com
/ollama/ollama/commit/2a21363bb756a7341d3d577f098583865bd7603f
web, patch
-
vicarius.io
/vsociety/posts/probllama-in-ollama-a-tale-of-a-yet-another-rce-vulnerability-cve-2024-37032
web, exploit, third-party-advisory
-
github.com
/ollama/ollama/compare/v0.1.33...v0.1.34
web, release-notes
-
github.com
/ollama/ollama/blob/adeb40eaf29039b8964425f69a9315f9f1694ba8/server/modelpath_test.go#L41-L58
web, product
-
nvd.nist.gov
/vuln/detail/CVE-2024-37032
advisory
-
github.com
/advisories/GHSA-8hqg-whrw-pv92
advisory
-
github.com
/ollama/ollama
package
-
pkg.go.dev
/vuln/GO-2024-2901
web
Sources
- CVE List CVE-2024-37032
- GitHub Advisory GHSA-8hqg-whrw-pv92
- NVD CVE-2024-37032
- OSV GO-2024-2901
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.