Downloads · 30 days
0
rajasingh010/ollama-zip-slip
ollama-zip-slip is a machine learning model from rajasingh010. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
File: server/model.go Function: extractFromZipFile() CVE: CVE-2024-45436
Downloads · 30 days
0
Access
Public
Updated Apr 4, 2026
Repo size
539 B
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 46%
From the Hugging Face model README
File: server/model.go
Function: extractFromZipFile()
CVE: CVE-2024-45436
Ollama < 0.1.47 does not validate extracted file paths stay within the models
directory. A ZIP with path traversal filenames like ../../../../etc/ld.so.preload
writes files outside the intended directory.
// Vulnerable: no path prefix validation
for _, f := range zip.File {
path := filepath.Join(modelsDir, f.Name)
// f.Name = "../../../../etc/ld.so.preload" → writes outside models dir
}
# Malicious ZIP contains: ../../../../etc/ld.so.preload
# When Ollama extracts it, file is written outside models dir