nday
CVE-2026-42249

Remote Code Execution in Ollama via Update Mechanism

Ollama / Ollama

Disclosed . nday has no fix record for it yet; that does not mean no patch exists. Listed by 1 of 4 PoC sources: metasploit. Not in CISA KEV.

why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

path traversal
CWE-22, stated by the CNA CERT-PL and NVD, republishing [email protected]
adjacent network
AV:A in 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 4.0) from the CNA CERT-PL
no authentication required
PR:N in 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 4.0) from the CNA CERT-PL
no user interaction
UI:N in 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 4.0) from the CNA CERT-PL
Metasploit
Metasploit modules exploit/windows/persistence/ollama_auto_update
stage
POC
disclosed
cvss
7.7 HIGH v4.0

Lifecycle

x axis UTC; dot = exact minute, wide bar = date only, hollow = unknown or inferred.
time unknown
DISdisclosed
04-29T11:44Z
PATpatch
no record yet
ANAanalysis
no record yet
POCPoC
metasploit
ITWexploited
no record yet
KEVKEV
no record yet

Summary

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.

Original text of the CVE record (cvelist), shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:A
Adjacent: only from a nearby network, such as the same LAN segment or Bluetooth range
Attack complexity AC:H
High: the attacker must evade or get around security measures such as ASLR or DEP, or obtain target-specific secrets
Attack requirements AT:P
Present: success depends on specific deployment or execution conditions, such as a race condition, a non-default setting or a position on the network path
Privileges required PR:N
None: no account or authorization needed
User interaction UI:N
None: no action by anyone other than the attacker

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 4.0 vector from the CVE record, scored by the CNA CERT-PL.

Event log

+DISdisclosed

CVE record published by CERT-PL. CVSS 7.7, high.

src cvelist · nday , bulk import · raw
{
  "id": 59400,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-42249",
  "occurred_at": "2026-04-29T11:44:39.807Z",
  "observed_at": "2026-11-12T16:27:38.849571Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "cna",
      "vector": "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",
      "version": "4.0",
      "base_score": 7.7,
      "base_severity": "HIGH"
    },
    "ssvc": {
      "timestamp": "2026-04-29T13:20:16.814725Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "total"
    },
    "state": "PUBLISHED",
    "date_published": "2026-04-29T11:44:39.807Z",
    "assigner_short_name": "CERT-PL"
  }
}
time unknownsource gave no time
+POCpublic PoC

Metasploit has module exploit/windows/persistence/ollama_auto_update (Ollama Windows Auto-Update Path Traversal Persistence). The source gives no release time for the module.

src metasploit exploit/windows/persistence/ollama_auto_update · nday , bulk import · raw
{
  "id": 52939,
  "type": "poc_published",
  "source": "metasploit",
  "url": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/persistence/ollama_auto_update.rb",
  "occurred_at": null,
  "observed_at": "2026-11-12T15:24:51.477477Z",
  "is_backfill": true,
  "dedupe_key": "exploit/windows/persistence/ollama_auto_update",
  "detail": {
    "url": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/persistence/ollama_auto_update.rb",
    "kind": "msf_module",
    "path": "/modules/exploits/windows/persistence/ollama_auto_update.rb",
    "rank": 600,
    "check": true,
    "title": "Ollama Windows Auto-Update Path Traversal Persistence",
    "cve_ids": [
      "CVE-2026-42248",
      "CVE-2026-42249"
    ],
    "fullname": "exploit/windows/persistence/ollama_auto_update",
    "rank_name": "excellent",
    "confidence": "curated",
    "module_type": "exploit",
    "module_last_modified": "2026-06-08 08:39:59 +0000",
    "vuln_disclosure_date": "2026-04-29"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Researcher discussion

0 researchers mentioned this in the last 7 days

Posts on X by researchers on nday's list that mention this CVE, shown as posted. nday does not check them.

nday has not collected any post on X by listed researchers that mentions this CVE.

Discussion

0 comments

No comments yet.