CVE-2025-54073: mcp-package-docs vulnerable to command injection in several tools
A command injection vulnerability exists in the mcp-package-docs
MCP Server. The vulnerability is caused by the unsanitized use of input parameters within a call to child_process.exec
, enabling an attacker to inject arbitrary system commands. Successful exploitation can lead to remote code execution under the server process’s privileges.
The server constructs and executes shell commands using unvalidated user input directly within command-line strings. This introduces the possibility of shell metacharacter injection (|
, >
, &&
, etc.).
References
- equixly.com/blog/2025/03/29/mcp-server-new-security-nightmare
- github.com/advisories/GHSA-3q26-f695-pp76
- github.com/advisories/GHSA-5w57-2ccq-8w95
- github.com/advisories/GHSA-gjv4-ghm7-q58q
- github.com/advisories/GHSA-vf9j-h32g-2764
- github.com/sammcj/mcp-package-docs
- github.com/sammcj/mcp-package-docs/commit/cb4ad49615275379fd6f2f1cf1ec4731eec56eb9
- github.com/sammcj/mcp-package-docs/releases/tag/v0.1.27
- github.com/sammcj/mcp-package-docs/releases/tag/v0.1.28
- github.com/sammcj/mcp-package-docs/security/advisories/GHSA-vf9j-h32g-2764
- invariantlabs.ai/blog/mcp-github-vulnerability
- nvd.nist.gov/vuln/detail/CVE-2025-54073
Code Behaviors & Features
Detect and mitigate CVE-2025-54073 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →