CVE-2026-102697: Ollama authorization bypass in experimental agent Bash tool approval

CVE-2026-102697 · Severity: high · CVSS 7.8 · Published 2026-09-29

Ollama is an open-source platform for running large language models locally. Versions 0.14.0 through 0.31.1 contain an authorization flaw in the experimental agent mode Bash tool approval mechanism that allows attackers to execute arbitrary shell commands. An attacker who can influence the model's output through prompt injection can bypass approval checks by appending shell operators to approved commands, potentially leading to unauthorized code execution on the host system.

Technologies: Ollama. Vendors: Ollama.

Quick answers

Is CVE-2026-102697 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-102697 being exploited in the wild.
How severe is CVE-2026-102697?
High severity, with a CVSS score of 7.8, published 29 September 2026.
Which products and versions are affected?
Ollama 0.14.0 to 0.31.1.
Is there a fix for CVE-2026-102697?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-102697 attacked?
It is attacked over the network.
Am I affected by CVE-2026-102697?
Check whether you run Ollama at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability exists in the Bash tool approval mechanism (x/agent/approval.go) which fails to properly parse shell syntax when validating approved commands. An attacker can inject control operators like semicolons or logical operators (&&, ||, |) to chain additional commands to an approved command, bypassing the session approval requirement. The attack requires the ability to influence model output through prompt injection and assumes the agent mode feature is enabled.

Affected products

  • Ollama Ollama 0.14.0 to 0.31.1

Timeline

  • 2026-09-29: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.