Security Resilience

CVE-2026-42249

Path Traversal in Ollama 0.12.10 – 0.17.5

Published
29 April 2026
Modified
11 November 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.0099 61th percentile
Risk Priority 33 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

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

Operationally, exploitation aligns with the MITRE ATT&CK technique /etc/passwd and /etc/shadow (T1003.008); ranked in the top 39% of CVEs by exploit likelihood; 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

MITRE ATT&CK v20.0

T1003.008 /etc/passwd and /etc/shadow Credential Access
Adversaries may attempt to dump the contents of <code>/etc/passwd</code> and <code>/etc/shadow</code> to enable offline password cracking.
T1087 Account Discovery Discovery
Adversaries may attempt to get a listing of valid accounts, usernames, or email addresses on a system or within a compromised environment.
T1216.001 PubPrn Stealth
Adversaries may use PubPrn to proxy execution of malicious remote files.
T1218.005 Mshta Stealth
Adversaries may abuse mshta.
T1218.010 Regsvr32 Stealth
Adversaries may abuse Regsvr32.
T1584.008 Network Devices Resource Development
Adversaries may compromise third-party network devices that can be used during targeting.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-42248Same product: Ollama Ollama
CVE-2026-7020Same product: Ollama Ollama
CVE-2024-37032Same product: Ollama Ollama
CVE-2024-39722Same product: Ollama Ollama
CVE-2024-45436Same product: Ollama Ollama
CVE-2025-11182Shared CWE-22, CWE-494
CVE-2025-53951Shared CWE-22
CVE-2024-49766Shared CWE-22
CVE-2023-2270Shared CWE-22
CVE-2025-6218Shared CWE-22

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)

Our mappings, made for this CVE.

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)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

ID.RA-09 full match
blocks

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

PR.DS-02 mostly match
blocks

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

PR.PS-05 mostly match
blocks

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

PR.PS-02 partial match
blocks

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.

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

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

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

blocks

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.

blocks

A.8.20's network controls (encryption of data in transit per (e), firewalls/filtering per (i), disabling vulnerable protocols per (n)) block some attack vectors for CWE-494 — in-transit modification and unauthorized access to update servers — but the root weakness (the product not verifying integrity of downloaded code) remains, so an attacker who bypasses network controls (e.g., compromises a legitimate server or tricks the client) can still exploit it.

prevents

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

prevents

A.8.30 contracts the supplier for secure design, coding and testing practices (8.25-8.29), which carry the preventive effect on this ordinary software weakness; the clause's own mechanism is contractual, so its reach is mediated and fallible in the same way the owner graded A.8.30 -> CWE-134.

blocks

A.8.7's malware detection and repair software (guidance f) scans data received over networks and downloads for known malware before use, which blocks some exploitation of CWE-494 by catching malicious payloads in transit. However, the underlying weakness — the product's own lack of integrity verification on downloaded code — remains present and exploitable by zero-day or signature-evading malware, and by adversary-in-the-middle substitution of legitimate-looking updates, which signature-based scanning does not reach.

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 our cross-walk; rows rated `none` are excluded, and each rule says how its mapping was checked.

Definition changed on 29 October 2026. Until then this section listed every rule rated above none, partial included. From that date it lists rules whose mapping is rated full or mostly and checked at llm_unverified or higher; partial mappings show when you ask.

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. blocks 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. blocks CWE-494
RHEL 7 (1 rule, 1 more partial)
  • 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. blocks 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. blocks 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. blocks 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. blocks CWE-494

References