UTC
Low

Ollama is Vulnerable to Path Traversal

CVE-2026-7020 · GHSA-x99g-8v8j-25j2 · published 2026-04-26 · updated 2026-05-05

Severity
Low
CVSS score
5.6
Chance of exploitation (EPSS)
0.91%
Fixed in
No fix yet
  • Exploitation Public proof of concept
  • Automatable No
  • Technical impact Partial
  • CISA SSVC
What it is

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.

What to do

No fixed release is listed yet for github.com/ollama/ollama. Follow the source advisory for updates, and until one ships:

General guidance from ShieldPi, not a vendor fix

  • Path traversal. Limit the folders it can reach at the operating-system level, such as a container or a user with access to only those folders, and keep credentials and keys outside them.
Affected
PackageRegistryAffectedFixed in
github.com/ollama/ollamaGo<= 0.20.2No fix yet

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].