{"id":"CVE-2026-102697","published":"2026-09-29T17:17:08.150","lastModified":"2026-09-29T21:32:59.833","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.","cvssScore":7.8,"cvssSeverity":"HIGH","cvssVector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cwes":["CWE-863"],"vendors":[],"products":[],"references":[{"url":"https://github.com/ollama/ollama","tags":[]},{"url":"https://github.com/ollama/ollama/blob/v0.31.1/x/agent/approval.go#L204-L206","tags":[]},{"url":"https://github.com/ollama/ollama/blob/v0.31.1/x/agent/approval.go#L389","tags":[]},{"url":"https://github.com/ollama/ollama/commit/a2b3a5e9a3956bc0700a8505580c11faf4da09b5","tags":[]},{"url":"https://github.com/ollama/ollama/releases/tag/v0.31.2","tags":[]},{"url":"https://www.vulncheck.com/advisories/ollama-0.14.0-before-0.31.2-experimental-agent-bash-approval-bypass-via-prefix-based-authorization","tags":[]}],"exploitRefs":[{"url":"https://github.com/ollama/ollama","tags":[]},{"url":"https://github.com/ollama/ollama/blob/v0.31.1/x/agent/approval.go#L204-L206","tags":[]},{"url":"https://github.com/ollama/ollama/blob/v0.31.1/x/agent/approval.go#L389","tags":[]},{"url":"https://github.com/ollama/ollama/commit/a2b3a5e9a3956bc0700a8505580c11faf4da09b5","tags":[]},{"url":"https://github.com/ollama/ollama/releases/tag/v0.31.2","tags":[]}],"hasPoc":true,"ai":{"summary":"The flaw allows attackers to execute additional shell commands by exploiting prompt injection in the experimental agent mode Bash tool approval mechanism, bypassing session approval requirements.","exploitability":"Exploitation is moderately hard as it requires attackers to influence model output through prompt injection, but once achieved, it can lead to full command execution.","blast_radius":"If exploited, this vulnerability could result in unauthorized command execution, potentially leading to complete system compromise.","remediation":"Upgrade to Ollama version 0.31.2 or later.","detection":"No reliable host or network indicator is derivable from the published description.","tags":["rce","auth-bypass","bash","shell","command-execution"],"model":"qwen2.5:7b-instruct","analyzedAt":"2026-10-06T08:45:51.734Z"}}