CVE-2026-42249
Remote Code Execution in Ollama via Update Mechanism
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Ollama >= 0.12.10, <= 0.17.5
Vulnerability facts
- Affected
- Ollama >= 0.12.10, <= 0.17.5
- Fixed in
- No fix listed yet
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.7 (v4.0, CNA)CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:LOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Adjacent network
- Attack complexity: High
- Attack requirements: Present
- Privileges required: None
- User interaction: None
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- Confidentiality impact on other systems: Low
- Integrity impact on other systems: Low
- Availability impact on other systems: Low
- EPSS
- 1.03% chance of exploitation in 30 days (percentile 63, 2026-11-26)
- CWE
- CWE-494, CWE-22
- Modified
Description
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 executes staged binaries without user interaction, this results in automatic and persistent code execution without user awareness. Maintainers of this project were notified early about this vulnerability, but didn't respond with the details of vulnerability or vulnerable version range. Versions from 0.12.10 to 0.17.5 were tested and confirmed as vulnerable, other versions were not tested but might also be vulnerable.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Ollama | >= 0.12.10, <= 0.17.5 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-42249. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-42249.md Affected: Ollama >= 0.12.10, <= 0.17.5 Fixed in: no fixed version listed yet Steps: 1. Search this machine and project for Ollama: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2026-42249 being exploited?
There is no confirmed exploitation: CVE-2026-42249 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.03% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-42249?
High: CVSS 7.7 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-42249?
Ollama >= 0.12.10, <= 0.17.5.
Is there a fix for CVE-2026-42249?
No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2026-42249?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.