{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42249 exists.","fix":"No fix published yet.","what":"CVE-2026-42249 is a high-severity path traversal vulnerability in Ollama, published on 29 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-42249 and fix it if it is affected.\n\nWhat it is: CVE-2026-42249 is a high-severity path traversal vulnerability in Ollama, published on 29 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42249 exists.\n\nAffected product: Ollama. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-42249/ (Markdown: https://insights.sbomify.com/CVE-2026-42249/index.md)","id":"CVE-2026-42249","markdown":"https://insights.sbomify.com/CVE-2026-42249/index.md","name":"CVE-2026-42249","record":{"aliases":["GHSA-7mp6-jmch-f3fh","MINI-7f2f-9rfm-gr2w"],"analysis":{"component_type":"desktop_application","fix_type":"no_fix_stated","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Ollama Windows client","requires_auth":"none","summary":"Attackers can achieve remote code execution on Windows by exploiting path traversal in the update mechanism to write and execute arbitrary files.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"CERT-PL","cpe":[{"product":"ollama","vendor":"ollama"}],"cvss":{"score":7.7,"severity":"high","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"},"cwes":[{"id":"CWE-494","name":"Download of Code Without Integrity Check"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.\nAn 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.\n\nCritically, 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.\n\nMaintainers 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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2026-04-29","github_poc":0,"max_poc_stars":null,"metasploit":1,"nuclei":0,"refs":[{"date":"2026-04-29","kind":"metasploit","ref":"exploit/windows/persistence/ollama_auto_update","stars":null,"title":"Ollama Windows Auto-Update Path Traversal Persistence"}],"tier":"weaponised"},"has_fix":true,"headline":"Remote Code Execution in Ollama via Update Mechanism","id":"CVE-2026-42249","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":0,"n_references":2,"next":{"headline":"Off-by-One Leading to Out-of-Bounds Write in bzip2","id":"CVE-2026-42250"},"packages":[],"prev":{"headline":"Missing Signature Verification for Updates in Ollama","id":"CVE-2026-42248"},"products":["Ollama"],"published":"2026-04-29","related":[{"cvss_score":9.8,"headline":"Ollama Platform has missing authentication enabling attackers to perform model management operations","id":"CVE-2025-63389","kev_date_added":null,"published":"2025-12-18"},{"cvss_score":9.1,"headline":"Ollama can extract members of a ZIP archive outside of the parent directory","id":"CVE-2024-45436","kev_date_added":null,"published":"2024-08-29"},{"cvss_score":8.8,"headline":"Ollama heap out-of-bounds read in GGUF tensor parsing leaks server process memory to unauthenticated remote attackers","id":"CVE-2026-7482","kev_date_added":null,"published":"2026-05-04"},{"cvss_score":8.8,"headline":"Ollama does not validate the format of the digest (sha256 with 64 hex digits)","id":"CVE-2024-37032","kev_date_added":null,"published":"2024-05-31"},{"cvss_score":8.7,"headline":"Ollama Multi-Modal Model Image Processing NULL Pointer Dereference","id":"CVE-2025-15514","kev_date_added":null,"published":"2026-01-12"},{"cvss_score":8.2,"headline":"Ollama Out-of-bounds Read","id":"CVE-2024-39720","kev_date_added":null,"published":"2024-10-31"},{"cvss_score":7.7,"headline":"Missing Signature Verification for Updates in Ollama","id":"CVE-2026-42248","kev_date_added":null,"published":"2026-04-29"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-04-29","vendors":["Ollama"]},"summary":"Attackers can achieve remote code execution on Windows by exploiting path traversal in the update mechanism to write and execute arbitrary files.","url":"https://insights.sbomify.com/CVE-2026-42249/"}