Unrated severityNVD Advisory· Published Jul 17, 2026· Updated Jul 20, 2026
ForgeCode Arbitrary Code Execution via Unvetted .mcp.json in Untrusted Repository
CVE-2026-57860
Description
ForgeCode (tailcallhq/forgecode), an AI pair-programming CLI, automatically loads and executes the MCP servers defined in a repository's .mcp.json file on startup without user confirmation. A malicious repository can supply a crafted .mcp.json whose mcpServers entries specify arbitrary command and args values (for example, command: bash with args: ['-c', 'touch /tmp/pwned']). When a user runs the forge CLI inside a cloned untrusted repository, the specified commands are spawned with the invoking user's privileges, resulting in arbitrary code execution. This provides a reliable initial-access and persistence primitive against developers who evaluate untrusted repositories with ForgeCode.
Affected products
1Patches
Vulnerability mechanics
References
4- github.com/tailcallhq/forgecode/commit/68ca3a3a26c73c38a700453d3d021b5bbdc15dbdmitrepatch
- www.vulncheck.com/advisories/forgecode-arbitrary-code-execution-via-unvetted-mcp-json-in-untrusted-repositorymitrethird-party-advisory
- github.com/tailcallhq/forgecode/issues/3022mitreissue-tracking
- github.com/tailcallhq/forgecode/issues/3252mitreissue-tracking
News mentions
0No linked articles in our index yet.