CVE-2026-7020 is a path traversal vulnerability in Ollama up to and including version 0.20.2. The issue is reported in the digestToPath function in x/imagegen/transfer/transfer.go within the Tensor Model Transfer Handler component. According to the provided content, improper handling of the digest argument allows path traversal, meaning attacker-controlled input can influence filesystem path resolution outside the intended directory constraints. The attack is described as remotely reachable, though exploitation is characterized as high complexity and difficult. A public exploit is reportedly available.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a compact, standalone Python proof-of-concept exploit for CVE-2026-7020 affecting Ollama. It contains only two files: a README describing the issue and usage, and a single executable script, poc.py, which is the exploit entry point. The exploit is not part of a larger framework. The core capability is unauthenticated arbitrary file read over the network by abusing Ollama's model registry workflow. The script stands up two local HTTP services: a fake registry on port 9999 that serves crafted manifest/config responses, and a second registry-like upload capture service on port 10000 that receives exfiltrated content. It then interacts with the target Ollama API using four endpoints: /api/pull, /api/copy, /api/push, and /api/delete. The malicious technique is to embed a path traversal sequence inside a tensor layer digest value, e.g. sha256:../../../../../../../../etc/ssh/ssh_host_ed25519_key. The fake manifest advertises this digest as a tensor blob with attacker-selected sizes. When the target pulls the crafted model, the vulnerable digest handling causes Ollama to read a local file instead of a legitimate blob. The exploit then copies and pushes the model to the attacker-controlled destination registry, where uploaded bytes are captured. Finally, it deletes the temporary model references from the target. The PoC specifically targets Linux SSH host private keys at /etc/ssh/ssh_host_ed25519_key, /etc/ssh/ssh_host_rsa_key, and /etc/ssh/ssh_host_ecdsa_key. Because exact file sizes may vary, it iterates through known likely sizes for each key type and stores the longest captured non-null data per path. Successful captures are printed to stdout. Operationally, the exploit requires that the target Ollama host can reach the attacker over HTTP and that the Ollama API is exposed without authentication. The repository is a real exploit rather than a detector: it performs end-to-end exfiltration and demonstrates practical impact.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
2 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.