Junglewise Threat Intelligence

CVE-2026-7446: VetCoders mcp-server-semgrep command injection in MCP interface

CVE-2026-7446 · Severity: low · CVSS 3.1 · Published 2026-04-30

Vendors: npm.

Executive brief

mcp-server-semgrep is a Node.js library that integrates Semgrep (a code scanning tool) with the Model Context Protocol interface. The vulnerability allows remote attackers to execute arbitrary operating system commands by injecting shell metacharacters into path arguments passed to multiple tools, potentially leading to full host compromise including data theft and service disruption.

Technical details

This is a command injection vulnerability (CWE-77/CWE-78) in src/index.ts affecting multiple MCP tools (analyze_results, filter_results, export_results, compare_results, scan_directory, create_rule). The vulnerable code performs inadequate input validation—only a prefix-based directory check—before interpolating user-controlled arguments directly into shell command strings executed via child_process.exec(). An attacker with network access to the MCP interface can inject shell metacharacters (e.g., `;`, `#`) to execute arbitrary OS commands with server process privileges. The vulnerability is remotely exploitable without authentication. Version 1.0.1 (patch 141335da044e53c3f5b315e0386e01238405b771) fixes this issue and is available.

Affected products

  • VetCoders mcp-server-semgrep <= 1.0.0

Timeline

  • 2026-04-14: disclosed: Vulnerability reported in issue #12
  • 2026-04-30: patched: Version 1.0.1 released with fix (commit 141335da044e53c3f5b315e0386e01238405b771)
  • 2026-04-30: advisory: GHSA-86hp-qxqp-w9wv published
  • 2026-04-30: other: Assigned CVE-2026-7446

References