# CVE-2026-42249: Remote Code Execution in Ollama via Update Mechanism

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.7
- **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:L`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 1.03% (percentile 63, 2026-11-28)
- **CWE:** CWE-494, CWE-22
- **Published:** 2026-04-29T11:44:39.807Z
- **Modified:** 2026-11-11T21:10:00.200Z

## Who should check

- Anyone running Ollama \>= 0.12.10, \<= 0.17.5

## 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

- Ollama: \>= 0.12.10, \<= 0.17.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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-28).

### 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.

## References

- other: <https://cert.pl/en/posts/2026/04/CVE-2026-42248/>
- other: <https://ollama.com/>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-42249>

HTML: <https://flawdb.com/CVE-2026-42249> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-42249>
