Ollama Path Traversal RCE in Update Mechanism (CVE-2026-42249)

high Nessus Plugin ID 313204

Synopsis

The Ollama instance installed on the remote Windows host is affected by a remote code execution vulnerability.

Description

The version of Ollama installed on the remote Windows host is affected by a remote code execution vulnerability:

- Ollama for Windows contains a Remote Code Execution vulnerability in its update mechanism due to improper handling of attacker-controlled HTTP response headers. When downloading updates, the application constructs local file paths using values derived from HTTP headers without validation. These values are passed directly to filepath.Join, allowing path traversal sequences (../) to be resolved and enabling files to be written outside the intended update staging directory. An attacker who can influence update responses can exploit this flaw to write arbitrary executables to attacker-chosen locations accessible to the current user, including the Windows Startup directory. This allows execution of arbitrary executables. (CVE-2026-42249)

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

Solution

See cert.pl advisory.

See Also

http://www.nessus.org/u?b4d71181

Plugin Details

Severity: High

ID: 313204

File Name: ollama_CVE-2026-42249.nasl

Version: 1.1

Type: Local

Agent: windows

Published: 5/8/2026

Updated: 5/8/2026

Configuration: Enable thorough checks (optional)

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.5

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

CVSS Score Source: CVE-2026-42249

CVSS v3

Risk Factor: Critical

Base Score: 9.8

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

CVSS v4

Risk Factor: High

Base Score: 7.7

Vector: CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L

Vulnerability Information

CPE: cpe:/a:ollama:ollama

Required KB Items: installed_sw/Ollama

Vulnerability Publication Date: 4/29/2026

Reference Information

CVE: CVE-2026-42249

IAVB: 2026-B-0116