Cyber Resilience

CVE-2026-42249

Path Traversal in Ollama 0.12.10 – 0.17.5

Published
29 April 2026
Modified
18 May 2026
Patch / advisory
CVSS Score v4 7.7
Click a component to see what it means
Raw vectorCVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0063 47th percentile
Risk Priority 32 floored blend · peak EPSS

Summary

CVE-2026-42249 is a high-severity Path Traversal (CWE-22) vulnerability in Ollama Ollama. Its CVSS base score is 7.7 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Supply Chain Compromise (T1195); ranked at the 47th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

This vulnerability is AI-related — categorised as NLP and Transformers; in the Supply Chain and Deployment risk domain.

The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and CM-14 (Signed Components) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

AI Security AnalysisAI

AI Category
NLP and Transformers
Risk Domain
Supply Chain and Deployment
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: ollama

Related Threats

MITRE ATT&CK Enterprise Techniques

T1195 Supply Chain Compromise Initial Access
Adversaries may manipulate products or product delivery mechanisms prior to receipt by a final consumer for the purpose of data or system compromise.
T1072 Software Deployment Tools Execution
Adversaries may gain access to and use centralized software suites installed within an enterprise to execute commands and move laterally through the network.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1195.001 Compromise Software Dependencies and Development Tools Initial Access
Adversaries may manipulate software dependencies and development tools prior to receipt by a final consumer for the purpose of data or system compromise.
T1195.002 Compromise Software Supply Chain Initial Access
Adversaries may manipulate application software prior to receipt by a final consumer for the purpose of data or system compromise.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-7020Same product: Ollama Ollama
CVE-2024-45436Same product: Ollama Ollama
CVE-2024-37032Same product: Ollama Ollama
CVE-2024-39722Same product: Ollama Ollama
CVE-2025-11182Shared CWE-22, CWE-494
CVE-2024-24749Same product: Microsoft Windows
CVE-2024-7263Same product: Microsoft Windows
CVE-2025-63372Same product: Microsoft Windows
CVE-2025-11001Same product: Microsoft Windows
CVE-2024-42474Same product: Microsoft Windows

Affected Assets

ollama
ollama
0.12.10 — 0.17.5

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 9 hardening rules · 5 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V5.3.2

Mitigating Controls (NIST 800-53 r5) AI

Requires digital signature verification before component installation, directly stopping execution of code downloaded without integrity checks.

Enforces the intended directory access authorizations that path traversal would otherwise bypass.

Input validation directly neutralizes special path elements before pathname construction occurs.

Employs integrity verification tools that can identify missing or failed checks on downloaded software after the fact.

Least privilege reduces the impact of any unauthorized file access obtained via traversal.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

ID.RA-09 full match
prevents

Directly requires assessing authenticity/integrity of software before acquisition and use, preventing unverified downloads.

PR.DS-02 mostly match
prevents

Requires cryptographic integrity protections (signatures/hashes) for data-in-transit, covering downloaded code.

PR.PS-05 mostly match
prevents

Prevents execution of unauthorized software, blocking the outcome of an unchecked download.

PR.PS-02 partial match
prevents

Patching/maintenance can remediate known path-traversal flaws in deployed software (partial prevention of exploitability) but does nothing to stop the coding defect from being introduced in the first place.

PR.AA-05 none match
prevents

PR.AA-05 defines and reviews access policies but does not address code-level pathname neutralization, so neither direction prevents CWE-22.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development catches path traversal via static/dynamic analysis.

prevents

Mandating integrity checks, digital signatures, and origin tracing for ICT components directly reduces the chance that code or firmware lacking an integrity check will be accepted into the organisation’s environment.

prevents

Secure SDLC mandates input validation and path sanitization that directly prevent path traversal.

prevents

Application security requirements include rules for safe file handling and canonicalization.

prevents

Secure architecture principles require least-privilege file access and directory isolation.

prevents

Secure coding standards explicitly forbid unsafe path construction and mandate safe APIs.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (authoritative rows only; rows rated `none` are excluded).

Oracle Linux 8 (1 rule)
  • V-248575 OL 8 must prevent the installation of software, patches, service packs, device drivers, or operating system components of local packages without verification they have been digitally signed using a certificate that is issued by a Certificate Authority (CA) that is recognized and approved by the organization. prevents CWE-494
Oracle Linux 9 (1 rule)
  • V-271524 OL 9 must check the GPG signature of software packages originating from external software repositories before installation. prevents CWE-494
RHEL 7 (2 rules)
  • V-204447 The Red Hat Enterprise Linux operating system must prevent the installation of software, patches, service packs, device drivers, or operating system components from a repository without verification they have been digitally signed using a certificate that is issued by a Certificate Authority (CA) that is recognized and approved by the organization. prevents CWE-494
  • V-204448 The Red Hat Enterprise Linux operating system must prevent the installation of software, patches, service packs, device drivers, or operating system components of local packages without verification they have been digitally signed using a certificate that is issued by a Certificate Authority (CA) that is recognized and approved by the organization. prevents CWE-494
RHEL 8 (1 rule)
  • V-230264 RHEL 8 must prevent the installation of software, patches, service packs, device drivers, or operating system components from a repository without verification they have been digitally signed using a certificate that is issued by a Certificate Authority (CA) that is recognized and approved by the organization. prevents CWE-494
RHEL 9 (1 rule)
  • V-257820 RHEL 9 must check the GPG signature of software packages originating from external software repositories before installation. prevents CWE-494

References