Email nightreaver.b@gmail.com with details. Do not open a public GitHub issue for security bugs.
This is a solo-maintained project. I aim to acknowledge reports within 7 days, but cannot guarantee a faster turnaround. Please set realistic expectations on response time.
python-ssh-mcp is a FastMCP server that grants an LLM real SSH, SFTP, Docker, and systemd access to remote hosts. Permissions are organised into tiers (read-only / low-access / exec / sudo / dangerous-docker), each gated by environment flags and surfaced through FastMCP Visibility transforms.
For the full architecture — policy gates, audit logging, connection pool, tool tiers — see AGENTS.md.
High-severity issues include, but are not limited to:
- Bypass of the policy gates:
host_policy,path_policy,exec_policy,redact_policy,local_path_policy(insrc/ssh_mcp/services/). - Bypass of the
@audit_logdecorator chain — any tool action that should have been logged but wasn't. - Command injection via tool parameters: path traversal, shell metacharacter escape, argv splitting flaws.
- Host key verification bypass or
known_hostshandling flaws. - Authentication flaws: key handling, agent forwarding, sudo password handling.
- Tier-flag bypass — for example, a dangerous tool callable when
ALLOW_DANGEROUS_TOOLS=0. - SFTP path-allowlist escape.
- Secret-redaction layer (v1.4.0+): a path matching the configured
redact_paths_globsreturning unredacted bytes through any tool other than the documented raw-exec path (ssh_exec_run/ssh_sudo_exec— see "Out of scope" / INC-064). Includes bypass ofredact_bypass_policy=block, of therestricted_globshard-deny list, of theSidecarSnapshotCAS race-protection onssh_host_notes_append, and hash-marker recovery techniques that reveal plaintext from a 12-char HMAC-SHA256 prefix whereSSH_REDACT_SALTis set to a strong operator value. - Sudo-tier path policy enforcement (v1.4.0+): the five sudo-tier path-bearing tools (
ssh_sudo_read,ssh_sudo_read_redacted,ssh_sudo_write,ssh_sudo_edit,ssh_sudo_sftp_list) all route throughresolve_path/resolve_path_for_redacted_read. Any sudo-elevated file operation that lands on a path which should have been blocked byrestricted_paths,restricted_globs, orredact_paths_globsis in scope. - Local-disk transfer allowlist (v1.3.0+):
local_path=onssh_upload/ssh_deploy/ssh_sftp_download/ssh_sudo_writereading or writing outsideSSH_LOCAL_TRANSFER_ROOTS(including via symlink escape, parent-traversal, or empty-allowlist enablement).
- Issues that require an attacker to already have full operator access to the MCP server's config,
.env, orhosts.toml. That is the project's trust boundary — once the operator's environment is compromised, all bets are off. - Known limitations documented in CONFIGURATION.md, AGENTS.md, or INCIDENTS.md. In particular: INC-064 —
ssh_exec_run/ssh_sudo_exectaking a command body (not a path) cannot be policy-checked againstredact_paths_globs. By-design; mitigation is operatorcommand_allowlistdiscipline (do not allowlistcat,less,head,tailif any host has secrets behind a redact glob). - Denial-of-service via expensive-but-permitted operations (e.g.
ssh_exec_run_streaminginvoked with a pathological command). Use operator-side rate limiting if this is a concern.
Coordinated disclosure preferred. A fix or documented mitigation will land before public detail is published. Credit will be offered unless the reporter requests anonymity.