Intel

AIKIDO-2026-736029

github.com/ollama/ollama is vulnerable to Path Traversal

Path TraversalCVE-2026-42249 Published 4 days ago

77

High Risk

This Affects:

GOgithub.com/ollama/ollama
0.12.10 - 0.23.2
Fixed in 0.23.3
Are you affected? Scan for Free

TL;DR

The bundled desktop application auto-updater builds the local staging path for a downloaded installer from attacker-influenceable HTTP response header values such as the filename and ETag. These values are passed to filepath.Join without validation, so ../ sequences let a staged file be written outside the update staging directory, including the Windows Startup folder. An attacker able to control or intercept the update response can drop and later execute an arbitrary executable, and chaining it with the missing update signature check yields silent persistent code execution. The fix constrains the filename with safeUpdateFilename, hashes the ETag into a fixed staging subdirectory, and enforces ensurePathInDir so the resolved path cannot escape the staging directory.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and using the bundled Windows desktop application automatic update flow.

Background info

github.com/ollama/ollama is vulnerable to Path Traversal in versions 0.12.10 - 0.23.2.

How to fix this

Upgrade the github.com/ollama/ollama library to the patch version.