
LlamaSmuggle (formerly BlindLlama): CVE-2026-102697 Reproduction
LlamaSmuggle is an incorrect authorization vulnerability in Ollama's experimental Agent Mode. This repository provides harmless tests for the vulnerable session approval decision in Ollama v0.31.1. The tests execute no shell commands and only call the relevant authorization functions.
The vulnerability was first published as BlindLlama. Test names (TestBlindLlama*), file names and the BLINDLLAMA_BASELINE marker keep the original name so they match the screenshots and expected output.
>= 0.14.0, < 0.31.2When a user grants session permission for cat repro/approved.txt, the vulnerable implementation stores the authorization as the prefix cat:repro/. A later command, cat repro/approved.txt; echo SECOND_COMMAND_EXECUTED, is reduced to the same prefix. ApprovalManager.IsAllowed therefore returns true, so the authorization layer does not request a new approval for the appended shell operation.
TestBlindLlamaNegativeControls bounds this result. It confirms the collision needs a prior session permission (a fresh manager denies the chained command), that a standalone out-of-scope command such as echo is not auto-allowed, and that the separate IsDenied denylist does not block the proof-of-concept command.
cat or echo commands.The live screenshots (01, 04, 05) were captured with the official Ollama v0.31.1 Windows release. Both the client and the server report 0.31.1, and the package SHA-256 matches Ollama's published sha256sum.txt. The model used in Agent Mode was qwen3.5:9b (ollama run qwen3.5:9b --experimental).
This repository is provided strictly for educational purposes, defensive security research, and the authorized reproduction of CVE-2026-102697.
The included tests are designed to demonstrate the affected authorization logic without executing the proof-of-concept shell commands. Any live reproduction should be conducted exclusively in a controlled, isolated environment on systems you own or are explicitly authorized to test.
Unauthorized access, exploitation, or use of these materials against third-party systems is strictly discouraged. Users are solely responsible for ensuring that their activities comply with applicable laws, regulations, and authorization requirements.
All materials are provided "AS IS", without warranty of any kind. To the extent permitted by applicable law, the author disclaims liability for damages, misuse, or consequences arising from the use of this repository.
This is an independent security research project and is not affiliated with or endorsed by Ollama or its maintainers.
Requirements:
Linux or macOS:
chmod +x run.sh
./run.sh
./run.sh /path/to/new/ollama-clone
Windows PowerShell:
.\run.ps1
.\run.ps1 C:\path\to\new\ollama-clone
If no clone directory is supplied, the script creates a unique directory below the operating system's temporary directory. The clone is retained for inspection.
On Windows, if the clone stops with Filename too long, use a shorter clone path or run git config --global core.longpaths true.
The complete output from a validated run is stored in expected-output.txt. The security-relevant lines are:
INPUT: cat repro/approved.txt
PREFIX: cat:repro/
INPUT: cat repro/approved.txt; echo SECOND_COMMAND_EXECUTED
PREFIX: cat:repro/
NEW_APPROVAL_REQUIRED=false
VULNERABLE_AUTHORIZATION_DECISION=true
NO_PRIOR_PERMISSION_ALLOWED=false
OUT_OF_SCOPE_ALLOWED=false
POC_DENYLISTED=false PATTERN=""
run.sh and run.ps1 run the unit tests above; they do not drive the live Agent Mode TUI. Screenshots 01, 04 and 05 were produced manually in this environment:
v0.31.1 Windows release (client and server both report 0.31.1).127.0.0.1:11436.qwen3.5:9b, started with ollama run qwen3.5:9b --experimental.repro/approved.txt (contents: BLINDLLAMA_BASELINE).Steps:
You must call the available bash tool with command cat repro/approved.txt. No text response.Allow for this session (scope: cat in repro/ directory (includes subdirs)).You must call the available bash tool with command cat repro/approved.txt; echo SECOND_COMMAND_EXECUTED. No text response.running: Bash: ... and prints both BLINDLLAMA_BASELINE and SECOND_COMMAND_EXECUTED.Ollama 0.31.2 removed the x/agent package and the affected experimental Agent Mode code path. This test intentionally does not compile against 0.31.2 because the vulnerable implementation it targets is no longer present.
01-session-approval.png: The user grants session permission for cat within the repro/ directory.02-prefix-collision.png: An uncached test run shows both command strings reducing to cat:repro/.03-source-version.png: The source checkout is pinned to v0.31.1, and the relevant source files match that tag.04-no-second-approval.png: The chained command runs without a second approval prompt and prints the harmless marker.05-runtime-versions.png: In the live environment, ollama -v and the server API both report 0.31.1, and the package SHA-256 matches Ollama's sha256sum.txt.Akıner Kısa
MIT