Incident report

Ollama Modelfile ZIP Archive Path Traversal During Local Model Creation

CVE-2024-45436 revealed a Zip-Slip style path traversal flaw inside Ollama (`< 0.1.47`) during extraction of uploaded ZIP archives in `CreateModel` workflows. Crafted archives containing relative `../` entry names could write files outside the intended model staging directory when extracting GGUF or adapter bundles. Combined with unauthenticated API access on misconfigured hosts, attackers gained arbitrary file write capabilities. Maintainers patched archive extraction to sanitize paths before creating output files on disk.

Incident record

Reported
Severity
High
Vector
Supply Chain
Affected system type
Self-Hosted LLM Inference & Model Serving Daemons
Reference
CVE-2024-45436
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-45436

Inspect in Interactive Incidents Hub

Defensive lesson

Sanitize every ZIP/tar member path against canonical target root containment prior to writing extracted model files.

Referenced techniques