| Component | Ollama |
| Severity | high (CVSS 7.8) |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Published (NVD) | 2026-09-29 |
| Affected versions | >= 0.14.0, < 0.31.2 from the CVE Program record written by the CNA that assigned the CVE |
| Fixed in | 0.31.2 |
| Weakness | CWE-863 |
| CISA KEV | not listed |
Versions, checked against NVD
NVD's record (status: Awaiting Analysis) lists no affected versions of Ollama for this CVE. The ranges above come from the CVE record written by VulnCheck, the CNA that assigned the CVE.
NVD description
Ollama versions 0.14.0 before 0.31.2 contain an incorrect authorization vulnerability in the experimental agent mode Bash tool approval mechanism that fails to properly parse shell syntax. Attackers who can influence model output through prompt injection can execute additional shell commands by appending control operators like semicolons or logical operators to approved commands, bypassing the session approval requirement.
What to do
- Upgrade Ollama to
0.31.2or later. - Do not expose the component's API or UI to the internet without authentication in front of it.
- Run Ollama bound to localhost and reach it over a private network rather than an open port. Ollama on a Raspberry Pi 5 · Ollama on a Mac mini M4 · Tailscale for self-hosted AI · Which machine for a 7B model next to an agent · Agent plus local model, the exact setup, €12
Sources
- NVD: CVE-2026-102697
- https://github.com/ollama/ollama
- https://github.com/ollama/ollama/blob/v0.31.1/x/agent/approval.go#L204-L206
- https://github.com/ollama/ollama/blob/v0.31.1/x/agent/approval.go#L389
- https://github.com/ollama/ollama/commit/a2b3a5e9a3956bc0700a8505580c11faf4da09b5
- https://github.com/ollama/ollama/releases/tag/v0.31.2
- https://www.vulncheck.com/advisories/ollama-0.14.0-before-0.31.2-experimental-agent-bash-approval-bypass-via-prefix-based-authorization