Executive brief
Ollama for Windows, a tool used to run large language models locally, contains a flaw in how it handles software updates. An attacker who can intercept or manipulate the update process can remotely install and run malicious software on a user's computer. Because the application updates silently in the background, this can lead to a permanent and hidden compromise of the system without any user interaction.
Technical details
A path traversal vulnerability exists in the Ollama for Windows update mechanism due to the improper use of 'filepath.Join' with unvalidated HTTP response headers. An attacker capable of influencing update responses (e.g., via Man-in-the-Middle or DNS poisoning) can inject '../' sequences to write arbitrary files outside the intended staging directory. When chained with CVE-2026-42248 (which bypasses signature verification on Windows), an attacker can write malicious executables to sensitive locations like the Windows Startup directory. Since Ollama performs silent automatic updates and executes staged binaries without user interaction, this leads to persistent remote code execution. Tested vulnerable versions range from 0.12.10 to 0.17.5.
Affected products
- Ollama Ollama for Windows 0.12.10 to 0.17.5 (confirmed)
Timeline
- 2026-04-29: advisory: Initial disclosure by CERT Polska
- 2026-04-29: disclosed: CVE-2026-42249 published