Mitsu
- Type
- MCP server
- Scanned
- Nov 17, 2026
- Version
- 27d113985320
- Files read
- 69
Mitsu is a terminal-based AI penetration-testing client with an embedded MCP server that connects language models to shell execution, 165+ security tools, web search, and assessment reporting. Its biggest risk is that prompt injection from target responses, web pages, or inspected files can bypass Recon mode's passive shell allowlist and Guided mode's saved command approvals to run arbitrary code or steal local credentials.
What it can reach
- Shell commands
- Executes bash commands (including sudo commands after prompting for a password), runs up to 165 security tools from the Armory catalog, and launches user-configured CLI wrappers and stdio MCP servers.
- Files
- Reads and lists files in the session workspace, searches artifacts in /tmp, snapshots and restores workspace files for rewind, and stores sessions, credentials, reports, and managed tools under ~/.config/mitsu and ~/.local/share/mitsu.
- Network
- Sends conversation history, session Intel, tool output, and attached images to configured LLM providers; queries web search and vulnerability services; fetches arbitrary HTTP/HTTPS URLs; and probes targets during active assessments.
- Secrets
- Reads and writes provider and search API keys in ~/.config/mitsu/credentials.json, uses ambient provider environment variables for LiteLLM and Keenable, collects sudo passwords via a TUI prompt, and stores discovered target credentials in session JSON files.
- System
- Can install and enable Docker Engine via the OS package manager, add the user to the privileged docker group, run a local SearXNG container on 127.0.0.1, read clipboard images via wl-paste or xclip, spawn terminal emulators, and self-update via pip, uv, or git.
- Browser
- Opens generated HTML attack-surface maps and HTML or PDF vulnerability assessment reports in the default web browser or PDF viewer.
Findings
-
HighPassive Recon mode shell allowlist bypass allows unapproved code execution and file read/write
New sessions start in Recon mode, which is documented as strictly passive and read-only unless the operator approves switching modes. However, _is_low_impact_recon_command checks only Path(parts[0]).name before passing the raw string to /bin/bash -c, and permits git status/diff/log/show with unrestricted flags. If the agent is tricked via prompt injection, it can read any file on the system including ~/.config/mitsu/credentials.json using git diff --no-index, overwrite arbitrary user files such as ~/.bashrc or ~/.config/mitsu/mcp_servers.json using git log --output=..., or execute any shell script without approval using BASH_ENV=/path/to/ls bash /dev/null because Path('BASH_ENV=/path/to/ls').name evaluates to 'ls'.
Fix: Execute allowlisted Recon commands directly with create_subprocess_exec without a shell, require parts[0] to be an exact bare command name containing no '/' or '=', and reject file-writing or out-of-workspace git flags such as --output and --no-index.
-
HighSudo password written to bash stdin can leak to child commands, LLM providers, and remote targets
When a bash command contains the word 'sudo', _run_bash prompts the user for their sudo password and pipes it directly into 'sudo -S -p "" -- /bin/bash -o pipefail -c <command>' without redirecting stdin to /dev/null before running the shell (unlike docker_installer.py, which explicitly runs 'exec </dev/null'). On systems with NOPASSWD sudoers rules (such as default Kali Linux installs) or a warm global sudo timestamp cache, sudo does not consume the password from stdin, leaving the cleartext sudo password unread in the pipe inherited by <command>. Any child process that reads stdin can transmit the password over the network (for example 'sudo nc ...') or print it to stdout where it is sent to the external LLM provider and saved to the session file.
Fix: Wrap the elevated shell with 'sh -c "exec </dev/null; exec \"$@\""' (as done in services/docker_installer.py) so child commands never inherit the stdin pipe containing the sudo password.
-
HighUnapproved URL fetching in web_search enables data exfiltration and SSRF in Recon and Guided modes
The built-in mitsu__web_search tool is annotated read_only_hint=True, allowing it to run with zero operator approval in both passive Recon mode and Guided mode even when no search engines are configured. When given an http:// or https:// URL, it calls fetch_web_page directly with no loopback, link-local, or private IP restrictions on requests or redirects. A prompt-injected agent can silently exfiltrate workspace files or saved session Intel in URL query parameters to an attacker-controlled server, probe internal services on 127.0.0.1 or cloud metadata at 169.254.169.254, or actively send HTTP requests to targets despite Recon mode's passive guarantee.
Fix: Require operator approval before opening direct URLs in Recon and Guided modes, and block loopback, link-local, and private IP addresses (including across HTTP redirects) in fetch_web_page.
-
MediumGuided mode 'always allow' prefix matching allows shell command injection without approval
In Guided mode, approving a bash command with the 'always allow commands starting with' option saves the first 64 characters of the command string and auto-approves any future command whose string starts with that prefix. Because _run_bash passes the full string to /bin/bash -c without checking for shell control operators, a prompt-injected agent can append '; <arbitrary command>' or '&& <arbitrary command>' after any previously trusted prefix (such as 'ls -la' or 'nmap -sV ...') and execute arbitrary commands silently.
Fix: Reject commands containing shell chaining, redirection, or substitution operators (such as ';', '&', '|', '`', '$', '<', '>', or newlines) when matching against saved command prefixes, or match parsed argv tokens executed without a shell.
-
MediumArmory installer pipes unpinned remote scripts from GitHub branches into sh and sudo bash
services/redteam_armory.py:387
For catalog entries using the official-script install method (Trivy, Grype, and Metasploit Framework), Mitsu downloads installer scripts directly from mutable main or master branches on raw.githubusercontent.com and pipes them into sh or sudo bash without commit pinning, cryptographic signature checks, or SHA-256 checksum verification. If an upstream repository or branch is compromised when a user approves installing the tool, arbitrary code runs as the current user or root.
Fix: Pin upstream installer URLs to immutable release tags or commit hashes and verify downloaded files against hardcoded SHA-256 digests before executing them.
-
MediumUnescaped session Intel records can break out of <session-intel> tags in the system prompt
Mitsu automatically imports Nmap service banners and CVE web search results into session Intel, then embeds intel_context(self.intel) inside <session-intel>...</session-intel> in the system prompt on every turn. Because intel_context serializes values with json.dumps without escaping '<' or '>', untrusted target banners or web snippets containing '</session-intel>' close the untrusted-data block early and inject instructions directly into the privileged system prompt, persisting across turns and surviving /clear.
Fix: Escape '<' and '>' (for example as '\u003c' and '\u003e') in intel_context before interpolating session Intel inside <session-intel> tags.
