Ollama < 0.1.46 Multiple Vulnerabilities

high Nessus Plugin ID 210502

Synopsis

The Ollama instance installed on the remote host is affected by multiple vulnerabilities.

Description

The version of Ollama installed on the remote host is prior to 0.1.46. It is, therefore, affected by multiple vulnerabilities:

- An issue was discovered in Ollama before 0.1.46. An attacker can use two HTTP requests to upload a malformed GGUF file containing just 4 bytes starting with the GGUF custom magic header. By leveraging a custom Modelfile that includes a FROM statement pointing to the attacker-controlled blob file, the attacker can crash the application through the CreateModel route, leading to a segmentation fault (signal SIGSEGV: segmentation violation).
(CVE-2024-39720)

- An issue was discovered in Ollama before 0.1.46. It exposes which files exist on the server on which it is deployed via path traversal in the api/push route. (CVE-2024-39722)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Ollama version 0.1.46 or later.

See Also

https://www.oligo.security/blog/more-models-more-probllms

Plugin Details

Severity: High

ID: 210502

File Name: ollama_0_1_146.nasl

Version: 1.1

Type: local

Agent: unix

Published: 11/7/2024

Updated: 11/7/2024

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.0

CVSS v2

Risk Factor: High

Base Score: 8.5

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

CVSS Score Source: CVE-2024-39720

CVSS v3

Risk Factor: High

Base Score: 8.2

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

Vulnerability Information

CPE: cpe:/a:ollama:ollama

Required KB Items: installed_sw/ollama

Patch Publication Date: 10/31/2024

Vulnerability Publication Date: 10/31/2024

Reference Information

CVE: CVE-2024-39720, CVE-2024-39722