Injection de commande OS dans github.com/sonirico/mcp-shell (CVE-2026-55581)
Résumé
Injection de commande OS dans github.com/sonirico/mcp-shell (CVE-2026-55581). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via security.yaml. Atténuation : mise à jour vers 0.6.0 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
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 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:
# 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:
// security.go:84-96
for _, allowed := range v.config.AllowedExecutables {
if v.matchesExecutable(executable, allowed) {…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-55581 a été découverte dans github.com/sonirico/mcp-shell.
Des attaquants peuvent cibler un point d'entrée spécifique comme security.yaml à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système. Score CVSS : 8.4/10.
Action : mettez à jour github.com/sonirico/mcp-shell vers 0.6.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/sonirico/mcp-shell CVE-2026-55581 » sur le site de l'éditeur.
CVE-2026-55581 (github.com/sonirico/mcp-shell) — CWE-78 / CVSS v3 8.4
Vecteur d'attaque : local / non authentifié / sans interaction utilisateur
Surface d'attaque : security.yaml / allowed_executables / security.go / shell_exec
Correctif : 0.6.0 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une injection de commande OS (CWE-78) affecte github.com/sonirico/mcp-shell. Les attaquants atteignent le code vulnérable via security.yaml sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/sonirico/mcp-shell. Surface d'attaque : security.yaml / allowed_executables / security.go / shell_exec.
Gravité : Élevée (CVSS 8.4/10). L'exploitation peut entraîner la prise de contrôle totale du système.
Mettre à jour vers 0.6.0.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'github.com/sonirico/mcp-shell' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/sonirico/mcp-shellを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/sonirico/mcp-shell to 0.6.0ステージング環境で 0.6.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com