{"id":"CVE-2026-57860","state":"PUBLISHED","title":"ForgeCode Arbitrary Code Execution via Unvetted .mcp.json in Untrusted Repository","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.","publishedAt":"2026-07-17T16:16:09.573Z","updatedAt":"2026-07-20T17:45:55.116Z","severity":{"score":8.4,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck"},"assigner":"VulnCheck","products":["tailcallhq forgecode"],"affected":[{"vendor":"tailcallhq","product":"forgecode","packageURL":"pkg:npm/forgecode","defaultStatus":"affected","versions":[{"version":"2.11.1","status":"affected","versionType":"git"}]}],"references":["https://github.com/tailcallhq/forgecode/issues/3022","https://github.com/tailcallhq/forgecode/issues/3252","https://github.com/tailcallhq/forgecode","https://github.com/tailcallhq/forgecode/commit/68ca3a3a26c73c38a700453d3d021b5bbdc15dbd","https://www.vulncheck.com/advisories/forgecode-arbitrary-code-execution-via-unvetted-mcp-json-in-untrusted-repository"],"weaknesses":["CWE-829"],"ingestedAt":"2026-10-29T20:12:24.861Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/57xxx/CVE-2026-57860.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-57860","state":"PUBLISHED","datePublished":"2026-07-17T16:16:09.573Z","dateUpdated":"2026-07-20T17:45:55.116Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-06-25T18:48:00.283Z"},"containers":{"cna":{"title":"ForgeCode Arbitrary Code Execution via Unvetted .mcp.json in Untrusted Repository","descriptions":[{"lang":"en","value":"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":[{"vendor":"tailcallhq","product":"forgecode","packageURL":"pkg:npm/forgecode","defaultStatus":"affected","versions":[{"version":"2.11.1","status":"affected","versionType":"git"}]}],"references":[{"url":"https://github.com/tailcallhq/forgecode/issues/3022","name":"GitHub Issue","tags":["issue-tracking"]},{"url":"https://github.com/tailcallhq/forgecode/issues/3252","name":"GitHub Issue","tags":["issue-tracking"]},{"url":"https://github.com/tailcallhq/forgecode","name":"Product","tags":["product"]},{"url":"https://github.com/tailcallhq/forgecode/commit/68ca3a3a26c73c38a700453d3d021b5bbdc15dbd","name":"Patch Commit","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/forgecode-arbitrary-code-execution-via-unvetted-mcp-json-in-untrusted-repository","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"ACTIVE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.4,"vectorString":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","version":"3.1","baseSeverity":"HIGH","baseScore":7.8,"vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-829","lang":"en","description":"Inclusion of Functionality from Untrusted Control Sphere","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-07-20T17:45:55.116Z"},"datePublic":"2026-07-17T00:00:00.000Z","credits":[{"lang":"en","value":"Saad ELHARAJ (SAAITAAMAA)","type":"finder"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"vulncheck"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/tailcallhq/forgecode/issues/3022","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-17T16:45:24.963875Z","id":"CVE-2026-57860","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-17T16:45:31.572Z"}}]}}}