INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2024-37032

Ollama does not validate the format of the digest (sha256 with 64 hex digits)

CVE-2024-37032 ยท 2024-05-31 moderate

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Path traversal and file access
Affected
github.com/ollama/ollama (Go)
EPSS
89.6% chance of exploitation in 30 days

How it works, in short

Model blob lookups accept digests without checking their format, so crafted strings containing ../ resolve to file paths outside the blob store. (Our summary, written by a model. The source text is below.)

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.