CVE-2025-54073: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in sammcj mcp-package-docs
mcp-package-docs is an MCP (Model Context Protocol) server that provides LLMs with efficient access to package documentation across multiple programming languages and language server protocol (LSP) capabilities. A command injection vulnerability exists in the `mcp-package-docs` MCP Server prior to the fix in commit cb4ad49615275379fd6f2f1cf1ec4731eec56eb9. 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.). Commit cb4ad49615275379fd6f2f1cf1ec4731eec56eb9 in version 0.1.27 contains a fix for the issue, but upgrading to 0.1.28 is recommended.
AI Analysis
Technical Summary
CVE-2025-54073 is a command injection vulnerability identified in the sammcj project’s mcp-package-docs server, a Model Context Protocol (MCP) server designed to provide large language models (LLMs) with efficient access to package documentation across multiple programming languages and Language Server Protocol (LSP) capabilities. The vulnerability arises from improper neutralization of special elements used in command execution (CWE-77). Specifically, the server uses the Node.js child_process.exec function to execute shell commands constructed from user-supplied input parameters without adequate sanitization or validation. This unsafe practice allows an attacker to inject arbitrary shell metacharacters such as pipes (|), redirection (>), and command chaining (&&), enabling execution of arbitrary system commands with the privileges of the server process. The vulnerability affects all versions prior to 0.1.27, with a fix introduced in commit cb4ad49615275379fd6f2f1cf1ec4731eec56eb9 and further improvements recommended in version 0.1.28. The CVSS v3.1 base score is 7.5 (high severity), reflecting the network attack vector, high impact on confidentiality, integrity, and availability, and the requirement for user interaction but no privileges or authentication. Although no known exploits are reported in the wild yet, the nature of the vulnerability makes it a critical risk for environments running vulnerable versions of mcp-package-docs, especially where the server is exposed to untrusted inputs or external networks. Attackers could leverage this flaw to execute arbitrary commands remotely, potentially leading to full system compromise, data exfiltration, or disruption of services.
Potential Impact
For European organizations, the impact of CVE-2025-54073 can be significant, particularly for those integrating mcp-package-docs into their development or AI infrastructure. Successful exploitation could lead to remote code execution, allowing attackers to compromise the confidentiality, integrity, and availability of critical systems. This could result in unauthorized access to sensitive intellectual property, disruption of AI-assisted development workflows, and potential lateral movement within corporate networks. Organizations relying on LLMs and language server protocols for software development, documentation, or automation may face operational downtime and reputational damage. Furthermore, if the compromised server has access to internal resources or sensitive data stores, the breach could escalate into broader network intrusions. Given the increasing adoption of AI and LSP tools in European tech sectors, the vulnerability poses a tangible risk to software vendors, research institutions, and enterprises leveraging these technologies.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should immediately upgrade mcp-package-docs to version 0.1.28 or later, which contains the official fix for the command injection flaw. Until the upgrade is applied, organizations should restrict network exposure of the mcp-package-docs server to trusted internal networks only and implement strict input validation and sanitization at the application layer to prevent injection of shell metacharacters. Employing runtime application self-protection (RASP) or web application firewalls (WAFs) capable of detecting and blocking command injection patterns can provide additional defense-in-depth. Monitoring and logging of command execution attempts should be enhanced to detect suspicious activity. Organizations should also conduct code reviews and security audits of any custom integrations involving mcp-package-docs to ensure no unsafe command execution practices exist. Finally, applying the principle of least privilege to the server process—running it with minimal permissions—can limit the impact of a successful exploit.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Ireland
CVE-2025-54073: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in sammcj mcp-package-docs
Description
mcp-package-docs is an MCP (Model Context Protocol) server that provides LLMs with efficient access to package documentation across multiple programming languages and language server protocol (LSP) capabilities. A command injection vulnerability exists in the `mcp-package-docs` MCP Server prior to the fix in commit cb4ad49615275379fd6f2f1cf1ec4731eec56eb9. 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.). Commit cb4ad49615275379fd6f2f1cf1ec4731eec56eb9 in version 0.1.27 contains a fix for the issue, but upgrading to 0.1.28 is recommended.
AI-Powered Analysis
Technical Analysis
CVE-2025-54073 is a command injection vulnerability identified in the sammcj project’s mcp-package-docs server, a Model Context Protocol (MCP) server designed to provide large language models (LLMs) with efficient access to package documentation across multiple programming languages and Language Server Protocol (LSP) capabilities. The vulnerability arises from improper neutralization of special elements used in command execution (CWE-77). Specifically, the server uses the Node.js child_process.exec function to execute shell commands constructed from user-supplied input parameters without adequate sanitization or validation. This unsafe practice allows an attacker to inject arbitrary shell metacharacters such as pipes (|), redirection (>), and command chaining (&&), enabling execution of arbitrary system commands with the privileges of the server process. The vulnerability affects all versions prior to 0.1.27, with a fix introduced in commit cb4ad49615275379fd6f2f1cf1ec4731eec56eb9 and further improvements recommended in version 0.1.28. The CVSS v3.1 base score is 7.5 (high severity), reflecting the network attack vector, high impact on confidentiality, integrity, and availability, and the requirement for user interaction but no privileges or authentication. Although no known exploits are reported in the wild yet, the nature of the vulnerability makes it a critical risk for environments running vulnerable versions of mcp-package-docs, especially where the server is exposed to untrusted inputs or external networks. Attackers could leverage this flaw to execute arbitrary commands remotely, potentially leading to full system compromise, data exfiltration, or disruption of services.
Potential Impact
For European organizations, the impact of CVE-2025-54073 can be significant, particularly for those integrating mcp-package-docs into their development or AI infrastructure. Successful exploitation could lead to remote code execution, allowing attackers to compromise the confidentiality, integrity, and availability of critical systems. This could result in unauthorized access to sensitive intellectual property, disruption of AI-assisted development workflows, and potential lateral movement within corporate networks. Organizations relying on LLMs and language server protocols for software development, documentation, or automation may face operational downtime and reputational damage. Furthermore, if the compromised server has access to internal resources or sensitive data stores, the breach could escalate into broader network intrusions. Given the increasing adoption of AI and LSP tools in European tech sectors, the vulnerability poses a tangible risk to software vendors, research institutions, and enterprises leveraging these technologies.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should immediately upgrade mcp-package-docs to version 0.1.28 or later, which contains the official fix for the command injection flaw. Until the upgrade is applied, organizations should restrict network exposure of the mcp-package-docs server to trusted internal networks only and implement strict input validation and sanitization at the application layer to prevent injection of shell metacharacters. Employing runtime application self-protection (RASP) or web application firewalls (WAFs) capable of detecting and blocking command injection patterns can provide additional defense-in-depth. Monitoring and logging of command execution attempts should be enhanced to detect suspicious activity. Organizations should also conduct code reviews and security audits of any custom integrations involving mcp-package-docs to ensure no unsafe command execution practices exist. Finally, applying the principle of least privilege to the server process—running it with minimal permissions—can limit the impact of a successful exploit.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-07-16T13:22:18.205Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 687a6fc6a83201eaacf4f8a6
Added to database: 7/18/2025, 4:01:10 PM
Last enriched: 7/26/2025, 12:51:50 AM
Last updated: 8/30/2025, 7:44:22 AM
Views: 20
Related Threats
CVE-2025-9689: SQL Injection in SourceCodester Advanced School Management System
MediumCVE-2025-0165: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in IBM watsonx Orchestrate Cartridge for IBM Cloud Pak for Data
HighCVE-2025-9688: Integer Overflow in Mupen64Plus
LowCVE-2025-9687: Improper Authorization in Portabilis i-Educar
MediumCVE-2025-9686: SQL Injection in Portabilis i-Educar
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.