CVE-2026-42249
CriticalSummary
Ollama for Windows contains a Remote Code Execution vulnerability in its update mechanism due to improper handling of attacker-controlled HTTP response headers. The application constructs local file paths using values derived from HTTP headers without validation, allowing attackers to write files outside the intended update staging directory.
Risk Assessment
Attackers can exploit this vulnerability to write arbitrary executables to locations accessible to the current user, potentially leading to the execution of malicious code. When chained with CVE-2026-42248, the risk increases as attackers can deliver malicious payloads that are executed automatically.
Recommendation
IT administrators are advised to update Ollama to the latest version that addresses this vulnerability and to implement validation mechanisms for HTTP headers in the update process. Additionally, consider restricting user permissions to directories where executable files can be written.
Original NVD description (English source)
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. Critically, when chained with CVE‑2026‑42248 (Missing Signature Verification for Updates), an attacker can deliver malicious payloads that are written to sensitive locations and executed automatically. Because Ollama for Windows performs silent automatic updates and execut

