highCVSS 8.4Vulnerability

CVE-2026-55581

### Summary `mcp-shell` ships a default Docker configuration (`security.yaml`) that includes `/bin/bash` in the `allowed_executables` allowlist. The command validator (`security.go`) only checks whether the first token of the supplied command matches an allowed executable; it does not inspect or reject shell command-mode flags such as `-c`. As a result, any MCP tool caller can send `command=/bin/bash -c <arbitrary-command>` to the `shell_exec` tool and execute commands that are not in the allowlist — including `id`, `env`, `curl`, `wget`, and any other binary present in the container. The bypass works with the default Docker image, requires no authentication, and requires no modifications to server configuration. Successful exploitation gives the attacker arbitrary OS command execution inside the container as `mcpuser`. ### Details `mcp-shell` implements a *secure mode* in which command execution is restricted to an explicit allowlist of executables defined in `security.yaml`. The Docker image ships this file with the following entry: ```yaml # security.yaml (line 29) allowed_executables: - "ls" - ... - "/bin/bash" # Only allow if you trust the arguments ``` The comment itself acknowledges the risk, but the shipped default does not enforce any argument-level restriction. The validation logic in `security.go` is responsible for enforcing secure mode: ```go // security.go:84-96 for _, allowed := range v.config.AllowedExecutables { if v.matchesExecutable(executable, allowed) { if err := v.checkBlockedPatternsAndCommands(command); err != nil { return err } return nil } } ``` `executable` is derived solely from `parts[0]` after splitting the input on whitespace (`security.go:67`). When the command is `/bin/bash -c id`, `executable` evaluates to `/bin/bash`, which matches the allowlist entry. The `-c` flag and subsequent arguments are passed to `checkBlockedPatternsAndCommands`, which only checks for shell metachar

Properties

ghsa_id
GHSA-3x77-wg38-92r3
summary
mcp-shell has a Secure Mode Allowlist Bypass via Default `/bin/bash` Executable
severity
high
cvss_score
8.4
cve_id
CVE-2026-55581
cvss_vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
is_ghsa_only
false
ghsa_published
2026-08-25T15:41:30Z
source_url
https://github.com/advisories/GHSA-3x77-wg38-92r3
ghsa_updated
2026-08-25T15:42:52Z

Related Entities (6)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]go/github.com/sonirico/mcp-shell

AFFECTS (1)

[Software]go/github.com/sonirico/mcp-shell

HAS_WEAKNESS (3)

[Weakness]Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
[Weakness]Permissive List of Allowed Inputs
[Weakness]Initialization of a Resource with an Insecure Default

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-55581 (CVSS 8.4) — Ninja Signal Threat Intelligence | Ninja Signal