Browse / AI Framework and Platform Flaws / CVE-2026-7020
Ollama is Vulnerable to Path Traversal
- Class
- AI Framework and Platform Flaws (filed by a model that read the advisory)
- Technique
- Path traversal and file access
- Affected
- github.com/ollama/ollama (Go)
- CVSS
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
- EPSS
- 0.9% chance of exploitation in 30 days
How it works, in short
A crafted digest value in the model transfer handler is not sanitised before path construction, letting requests reach files outside the intended directory. (Our summary, written by a model. The source text is below.)
Details
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.
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-7020
- https://github.com/ollama/ollama
- https://vuldb.com/submit/797576
- https://vuldb.com/vuln/359599
- https://vuldb.com/vuln/359599/cti
Source: GitHub Advisory Database, used under CC BY 4.0.