← All advisories
CVE-2026-102697highAgent hijacking2026-09-29

CVE-2026-102697: Ollama agent mode's Bash approval can be bypassed with ; or &&

In Ollama's experimental agent mode, approving a Bash command for the session also let through anything chained onto it. A prompt injection could tack extra commands onto an approved one and run them without asking.

01.

What it is

VulnCheck: the agent mode Bash tool approval in Ollama 0.14.0 before 0.31.2 "fails to properly parse shell syntax" and authorizes commands by prefix.

An attacker who can influence model output through prompt injection (for example, text in a web page or file the agent reads) can append control operators such as semicolons or logical operators to an approved command and run more commands, skipping the session approval step.

This only affects the experimental agent mode, not normal model serving through the Ollama API. Credited to Akıner Kısa.

02.

How to check

  1. Affected: Ollama >= 0.14.0, < 0.31.2.
  2. You're exposed if you've used Ollama's experimental agent mode and approved Bash commands for a session.
03.

How to fix

  1. Upgrade Ollama to 0.31.2 or later.
  2. Until then, don't use session-wide Bash approvals in agent mode, and review each command before it runs.
ollama --version
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

New advisories, CVEs and fixes for Lovable, Bolt, v0, Replit, Base44 and Cursor apps. No roundups of things you already read.

Free. The list is new, so the first issues go out once there are readers. Unsubscribe from any email in one click. We never sell or share addresses.