CVE-2026-42249

Source
https://cve.org/CVERecord?id=CVE-2026-42249
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-42249.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-42249
Downstream
Published
2026-04-29T11:44:39.807Z
Modified
2026-07-15T01:49:11.473875852Z
Severity
  • 7.7 (High) CVSS_V4 - 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 Calculator
Summary
Remote Code Execution in Ollama via Update Mechanism
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-22",
        "CWE-494"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42249.json",
    "cna_assigner": "CERT-PL"
}
References

Affected packages

Git / github.com/ollama/ollama

Affected ranges

Type
GIT
Repo
https://github.com/ollama/ollama
Events
Database specific
{
    "cpe": "cpe:2.3:a:ollama:ollama:*:*:*:*:*:*:*:*",
    "source": [
        "AFFECTED_FIELD",
        "CPE_RANGE"
    ],
    "extracted_events": [
        {
            "introduced": "0.12.10"
        },
        {
            "last_affected": "0.17.5"
        }
    ]
}

Affected versions

v0.*
v0.12.10
v0.12.10-rc1
v0.12.11
v0.12.11-rc0
v0.12.11-rc1
v0.13.0
v0.13.0-rc0
v0.13.1
v0.13.1-rc0
v0.13.1-rc1
v0.13.1-rc2
v0.13.2
v0.13.2-rc0
v0.13.2-rc1
v0.13.2-rc2
v0.13.3
v0.13.3-rc0
v0.13.3-rc1
v0.13.4
v0.13.4-rc0
v0.13.4-rc1
v0.13.4-rc2
v0.13.5
v0.13.5-rc0
v0.13.5-rc1
v0.14.0
v0.14.0-rc0
v0.14.0-rc1
v0.14.0-rc10
v0.14.0-rc11
v0.14.0-rc2
v0.14.0-rc3
v0.14.0-rc4
v0.14.0-rc5
v0.14.0-rc6
v0.14.0-rc7
v0.14.0-rc8
v0.14.0-rc9
v0.14.1
v0.14.2
v0.14.2-rc0
v0.14.2-rc1
v0.14.3
v0.14.3-rc0
v0.14.3-rc1
v0.14.3-rc2
v0.14.3-rc3
v0.15.0
v0.15.0-rc0
v0.15.0-rc1
v0.15.0-rc2
v0.15.0-rc3
v0.15.0-rc4
v0.15.0-rc5
v0.15.0-rc6
v0.15.1
v0.15.1-rc0
v0.15.1-rc1
v0.15.2
v0.15.3
v0.15.4
v0.15.5
v0.15.5-rc0
v0.15.5-rc1
v0.15.5-rc2
v0.15.5-rc3
v0.15.5-rc4
v0.15.5-rc5
v0.15.6
v0.16.0
v0.16.0-rc0
v0.16.0-rc1
v0.16.0-rc2
v0.16.1
v0.16.2
v0.16.2-rc0
v0.16.3
v0.16.3-rc0
v0.16.3-rc1
v0.16.3-rc2
v0.17.0
v0.17.0-rc0
v0.17.0-rc1
v0.17.0-rc2
v0.17.1
v0.17.1-rc0
v0.17.1-rc1
v0.17.1-rc2
v0.17.2
v0.17.3
v0.17.4
v0.17.5

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-42249.json"