CVE-2024-7773

critical

Description

A vulnerability in ollama/ollama version 0.1.37 allows for remote code execution (RCE) due to improper input validation in the handling of zip files. The vulnerability, known as ZipSlip, occurs in the parseFromZipFile function in server/model.go. The code does not check for directory traversal sequences (../) in file names within the zip archive, allowing an attacker to write arbitrary files to the file system. This can be exploited to create files such as /etc/ld.so.preload and a malicious shared library, leading to RCE.

References

https://huntr.com/bounties/aeb82e05-484f-4431-9ede-25a3478d8dbb

https://github.com/ollama/ollama/commit/123a722a6f541e300bc8e34297ac378ebe23f527

Details

Source: Mitre, NVD

Published: 2025-03-20

Updated: 2025-03-26

Risk Information

CVSS v2

Base Score: 10

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C

Severity: Critical

CVSS v3

Base Score: 9.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Severity: Critical