AAK-MCP-SFMCP-CVE-2026-117561-001: sf-mcp, every release: Salesforce CLI flag values reach a shell command string
- Severity
- HIGH
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
SfMcpFlagValueShellInjection
What it detects
sf-mcp (npm sf-mcp, codefriar/sf-mcp), an MCP server for the Salesforce CLI, builds each sf command as a string and runs it with execSync. Flag values go through an escapeValue that only wraps a value holding a space in double quotes, so backticks, $() and other shell metacharacters in a value a client or a prompt-injected agent sends run commands as the server's user (CVE-2026-117561, CVSS 7.8, CWE-78). Checked in the published npm packages: 1.1.0, the first release, and 1.3.2, the newest (2025-05-27), both do. codefriar/sf-mcp#17 is open and there is no fixed release.
How to fix
Remove sf-mcp from agents that read untrusted content, or run it as a user whose Salesforce orgs and files hold nothing worth taking; there is no fixed release. A fork that passes the CLI its arguments as an array (execFile, or spawn without a shell) closes the injection.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-SFMCP-CVE-2026-117561-001
Limitations
Reports an npm reference to sf-mcp: a package.json or lockfile entry, or the package an npx launch in an MCP config names. Presence-only: every version is reported, a future fixed one included, until the pin gets a floor, and so is a reference that states no version, which installs 1.3.2. The README's own launches are a clone run by path and npx -y codefriar/sf-mcp, a GitHub reference rather than the npm name, and the package's executable is sfmcp, so none of those is reported. PyPI's sf-mcp (Signal Found's server) is another project, so a Python requirement and a uvx launch are not matched. It reads the name and version, not which tools the client lets the model call. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-117561
- OWASP MCP Top 10: MCP05:2025 (Command Injection & Execution), MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI05 (Unexpected Code Execution (RCE))
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-01 (Shell Injection via MCP)
- CSA AI Controls Matrix (AICM): AIS-07, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-SFMCP-CVE-2026-117561-001.md: the page then shows that text, with the registry reference appended under it.