Description
A security flaw has been discovered in Ollama up to 0.20.2. This affects the function digestToPath of the file x/imagegen/transfer/transfer.go of the component Tensor Model Transfer Handler. The manipulation of the argument digest results in path traversal. The attack may be performed from remote. This attack is characterized by high complexity. The exploitability is reported as difficult. The exploit has been released to the public and may be used for attacks. The vendor was contacted early about this disclosure but did not respond in any way.
Published: 2026-04-26
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Path Traversal – Arbitrary File Access
Action: Apply Patch
AI Analysis

Impact

This vulnerability, identified as CWE‑22, allows manipulation of the digest argument in the digestToPath function of Ollama’s Tensor Model Transfer Handler. By supplying a crafted digest value, an attacker can cause the function to resolve paths outside the intended directory, resulting in path traversal that can read or overwrite arbitrary files on the host. The flaw is remote‑usable with high complexity and difficult exploitation, and a public exploit has already been released.

Affected Systems

Ollama versions up to 0.20.2 are affected. Any deployment that exposes the Tensor Model Transfer Handler to external clients is at risk. No other vendors or products are listed as impacted.

Risk and Exploitability

The CVSS score of 6.3 indicates moderate severity. The EPSS score of less than 1% and the absence from the CISA KEV catalog suggest a low likelihood of widespread exploitation at present. Nevertheless, because the vulnerability permits arbitrary file access from a remote attacker, it could be leveraged to pivot, exfiltrate data, or enable further compromise once foothold is gained. Based on the description, the likely attack vector is remote, though specific network reachability depends on the deployment configuration.

Generated by OpenCVE AI on April 28, 2026 at 13:27 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest Ollama release that includes the fix for the digestToPath path traversal vulnerability.
  • Restrict external access to the Tensor Model Transfer Handler by applying network segmentation or firewall rules so that only trusted hosts can contact the endpoint.
  • Validate and sanitize the digest input on the server side, enforcing strict character restrictions or whitelisting and preventing the resolution of relative paths.
  • If the feature is not required, disable or remove the Tensor Model Transfer Handler to eliminate the attack surface.

Generated by OpenCVE AI on April 28, 2026 at 13:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-x99g-8v8j-25j2 Ollama is Vulnerable to Path Traversal
History

Wed, 06 May 2026 05:30:00 +0000

Type Values Removed Values Added
Metrics cvssV2_0

{'score': 5.1, 'vector': 'AV:N/AC:H/Au:N/C:P/I:P/A:P/E:POC/RL:ND/RC:UR'}

cvssV3_0

{'score': 5.6, 'vector': 'CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV3_1

{'score': 5.6, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P'}

cvssV2_0

{'score': 2.6, 'vector': 'AV:N/AC:H/Au:N/C:P/I:N/A:N/E:POC/RL:ND/RC:UR'}

cvssV3_0

{'score': 3.7, 'vector': 'CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P/RL:X/RC:R'}

cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P/RL:X/RC:R'}

cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P'}


Tue, 28 Apr 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Low


Mon, 27 Apr 2026 14:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sun, 26 Apr 2026 05:15:00 +0000

Type Values Removed Values Added
Description A security flaw has been discovered in Ollama up to 0.20.2. This affects the function digestToPath of the file x/imagegen/transfer/transfer.go of the component Tensor Model Transfer Handler. The manipulation of the argument digest results in path traversal. The attack may be performed from remote. This attack is characterized by high complexity. The exploitability is reported as difficult. The exploit has been released to the public and may be used for attacks. The vendor was contacted early about this disclosure but did not respond in any way.
Title Ollama Tensor Model Transfer transfer.go digestToPath path traversal
First Time appeared Ollama
Ollama ollama
Weaknesses CWE-22
CPEs cpe:2.3:a:ollama:ollama:*:*:*:*:*:*:*:*
Vendors & Products Ollama
Ollama ollama
References
Metrics cvssV2_0

{'score': 5.1, 'vector': 'AV:N/AC:H/Au:N/C:P/I:P/A:P/E:POC/RL:ND/RC:UR'}

cvssV3_0

{'score': 5.6, 'vector': 'CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV3_1

{'score': 5.6, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulDB

Published:

Updated: 2026-05-06T04:55:00.516Z

Reserved: 2026-04-25T11:29:26.173Z

Link: CVE-2026-7020

cve-icon Vulnrichment

Updated: 2026-04-27T13:12:37.112Z

cve-icon NVD

Status : Modified

Published: 2026-04-26T05:16:02.023

Modified: 2026-05-06T06:16:08.573

Link: CVE-2026-7020

cve-icon Redhat

Severity : Low

Publid Date: 2026-04-26T04:45:11Z

Links: CVE-2026-7020 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-28T13:30:32Z

Weaknesses