Command Injection Affecting mcp-docker package, versions [,1.0.2)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-MCPDOCKER-14172372
  • published4 Dec 2025
  • disclosed2 Dec 2025
  • creditUnknown

Introduced: 2 Dec 2025

CVE NOT AVAILABLE CWE-78  (opens in a new tab)

How to fix?

Upgrade mcp-docker to version 1.0.2 or higher.

Overview

mcp-docker is a Model Context Protocol server for Docker management with AI assistants

Affected versions of this package are vulnerable to Command Injection due to insufficient validation of list-format commands in the docker_exec_command tool. The docker_exec_command tool accepts a user-controlled cmd parameter that can be provided as a list, and before the introduction of the validate_command_safety() helper, only string-based commands were inspected for dangerous patterns, allowing malicious list elements to bypass these checks and be sent unfiltered to the Docker engine for execution.

References

CVSS Base Scores

version 4.0
version 3.1