GitHub Advisory — sf-mcp-server command injection RCE (CVE-2026-26029)
AI relevance: sf-mcp-server is a Salesforce Model Context Protocol server for Claude Desktop, so a single tool call can become shell access on the MCP host.
- CVE-2026-26029 is a command injection flaw in sf-mcp-server that enables arbitrary command execution.
- Root cause: the
query_recordstool built a Salesforce CLI command string and executed it viachild_process.exec. - User-controlled fields like
targetOrg,sObject,fields,where,orderBy, andlimitflowed directly into the shell command. - Shell metacharacters (
;,&,|) can be injected to run additional commands with the MCP server’s privileges. - The advisory includes a PoC showing a malicious
targetOrgvalue executingwhoamion the host. - Fix: the patch replaces
execwithexecFileand passes arguments as an array to avoid shell interpretation.
Why it matters
- MCP servers sit on the boundary between agent intent and host execution; command injection turns prompt-level control into full RCE.
- Salesforce access implies sensitive CRM data; a compromised MCP host can pivot into data exfiltration or credential theft.
- This mirrors a wider MCP pattern: classic injection bugs in tool wrappers that assume agent-provided strings are safe.
What to do
- Update to a patched release or apply the commit that switches to
execFile. - Audit MCP tools for any
exec/spawnusage with user-controlled input. - Run MCP servers with least-privilege service accounts and filesystem/network isolation.