| tiêu đề | DeDeveloper23 codebase-mcp <=1.0.0 Command Injection |
|---|
| Mô tả | A command injection vulnerability exists in codebase-mcp due to unsafe use of child_process.execSync when constructing RepoMix commands with user-controlled input. Successful exploitation allows attackers to execute arbitrary shell commands with the privileges of the MCP server process. The following MCP tools construct command strings using user-supplied parameters and execute them via child_process.execSync:
getCodebase: interpolates includePatterns and ignorePatterns parameters
getRemoteCodebase: interpolates repo, includePatterns, and ignorePatterns parameters
saveCodebase: interpolates outputFile, includePatterns, and ignorePatterns parameters
Because execSync invokes commands through a system shell, specially crafted input containing shell metacharacters (such as `;`, `&`, or `|`) may be interpreted as additional commands rather than treated as data.
For example, an attacker could supply a malicious value in includePatterns to inject arbitrary shell commands, which would then be executed with the privileges of the MCP server process.
The vulnerability results from shell-based command execution combined with direct interpolation of untrusted input. In MCP environments, LLM-generated tool parameters influenced by external content may trigger execution of injected commands without direct local user interaction.
|
|---|
| Nguồn | ⚠️ https://github.com/DeDeveloper23/codebase-mcp/issues/7 |
|---|
| Người dùng | Yinci Chen (UID 94659) |
|---|
| Đệ trình | 12/03/2026 04:46 (cách đây 4 các tháng) |
|---|
| Kiểm duyệt | 27/03/2026 15:24 (15 days later) |
|---|
| Trạng thái | được chấp nhận |
|---|
| Mục VulDB | 353907 [DeDeveloper23 codebase-mcp đến 3ec749d237dd8eabbeef48657cf917275792fde6 RepoMix Command src/tools/codebase.ts getCodebase/getRemoteCodebase/saveCodebase nâng cao đặc quyền] |
|---|
| điểm | 20 |
|---|