CVE-2026-102697

Ollama 0.14.0 before 0.31.2 Experimental Agent Bash Approval Bypass via Prefix-Based Authorization

Published Sep 29, 2026 CVSS 4.0 · 8.5 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Ollama versions 0.14.0 through 0.31.1 contain a flaw in the experimental agent Bash tool where the approval logic incorrectly parses shell syntax. When an attacker can influence model output, for example through prompt injection, they can append control operators such as semicolons or logical operators to an approved command, causing the shell to execute unintended commands. This bypasses the intended session approval requirement and permits arbitrary command execution within the agent context, exposing the host to confidentiality, integrity, and availability risks.

Affected Systems

Ollama’s Ollama application, specifically the experimental agent Bash component, is affected from release 0.14.0 up to and including 0.31.1. All users running those releases with experimental agent mode enabled are at risk.

Risk and Exploitability

The vulnerability scores a CVSS of 8.5, indicating high severity. EPSS data is not available, and it is not currently listed in CISA’s KEV catalog, but the high CVSS coupled with the ability to inject commands via prompt manipulation makes it a serious threat. The likely attack vector is remote via prompt injection when the application is exposed to untrusted input, as the attacker can influence model output to append control operators. Once the privilege bypass is achieved, the attacker can execute arbitrary shell commands, potentially compromising the host.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Ollama version 0.31.2 or later, which fixes the approval parsing bug.
  • Disable the experimental agent mode or ensure that only trusted users can invoke it.
  • Restrict network access to the Ollama daemon to trusted hosts and filter all prompt inputs for injection patterns.
  • Monitor system logs for unexpected shell command executions and unauthorized approval attempts.

Generated by OpenCVE AI on September 30, 2026 at 01:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Ollama 0.14.0 before 0.31.2 Experimental Agent Bash Approval Bypass via Prefix-Based Authorization
First Time appeared Ollama
Ollama ollama
Weaknesses CWE-863
CPEs cpe:2.3:a:ollama:ollama:*:*:*:*:*:*:*:*
Vendors & Products Ollama
Ollama ollama
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Sep 29, 2026, 5:28 PM
Reserved
Sep 29, 2026, 4:10 PM
Status
Awaiting Analysis
Published
Sep 29, 2026, 5:17 PM
Modified
Sep 29, 2026, 9:32 PM