nday
CVE-2026-42249

Remote Code Execution in Ollama via Update Mechanism

Ollama / Ollama

披露于 。本站尚未获取修复依据,不能据此认为没有补丁。PoC 来源中 metasploit 已收录(1/4)。尚未列入 CISA KEV。

标签 漏洞类型path traversal 攻击途径相邻网络无需认证无需用户交互 利用情况Metasploit
这些标签的依据

这些标签由 nday 按固定规则从下列事实自动推导,不是 NVD、编号分配方或其他来源给出的。全部标签和规则见 ~/tags。

path traversal
CWE-22(来源:编号分配方 CERT-PL、NVD(转录自 [email protected]))
相邻网络
编号分配方 CERT-PL 给出的 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)中的 AV:A
无需认证
编号分配方 CERT-PL 给出的 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)中的 PR:N
无需用户交互
编号分配方 CERT-PL 给出的 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)中的 UI:N
Metasploit
Metasploit 模块 exploit/windows/persistence/ollama_auto_update
当前阶段
POC
披露
CVSS
7.7 HIGH v4.0

生命周期

横轴 UTC;点=精确到分钟,宽条=仅日期,空心=未知或推定。
时间未知
DIS披露
04-29T11:44Z
PAT补丁
尚无记录
ANA分析
尚无记录
POCPoC
metasploit
ITW在野
尚无记录
KEVKEV
尚无记录

摘要

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.

以上是 CVE 记录(cvelist)中的原文,未经改写。

利用条件

按 CVSS 向量说明攻击需要的条件。
攻击途径 AV:A
相邻网络:只能从邻近网络发起,例如同一局域网网段或蓝牙范围内
攻击复杂度 AC:H
高:须规避或绕过 ASLR、DEP 等安全防护,或须获取目标特有的机密信息
攻击前提 AT:P
有:依赖特定的部署或运行条件,例如竞态条件、非默认配置或处于网络路径中间
所需权限 PR:N
无:不需要账号或授权
用户交互 UI:N
无:除攻击者外不需要任何人配合

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 向量,来自 CVE 记录,由 CNA CERT-PL 评定。

事件记录

+DIS披露

CVE 记录发布,编号分配方是 CERT-PL。CVSS 7.7,高危。

来源 cvelist · 本站 批量导入 · 原始记录
{
  "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"
  }
}
时间未知来源未给出时间
+POC公开 PoC

Metasploit 收录模块 exploit/windows/persistence/ollama_auto_update(Ollama Windows Auto-Update Path Traversal Persistence)。来源没有给出模块的发布时间。

来源 metasploit exploit/windows/persistence/ollama_auto_update · 本站 批量导入 · 原始记录
{
  "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"
  }
}

纠错

报告错误或缺失

页面有误或缺失?告诉编辑;采纳后在本页修订记录公开说明,上游数据不会被改动。

研究员讨论

近 7 天有 0 位研究员提到

研究员在 X 上提到此 CVE 的帖子,原文照录,nday 不核实。

尚未采集到名单内研究员在 X 上提到此 CVE 的帖子。

讨论

0 条评论

还没有评论。