CVE-2026-57860 ForgeCode Arbitrary Code Execution via Unvetted .mcp.json in Untrusted Repository

High 8.4 Published Updated

Attackers can execute arbitrary code by tricking developers into running the CLI in a malicious repository containing a crafted .mcp.json file.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-57860?

CVE-2026-57860 is a high-severity code injection vulnerability in tailcallhq forgecode, published on 17 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-829

Which versions are affected by CVE-2026-57860?

How do I fix CVE-2026-57860?

No fix has been published for CVE-2026-57860 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-57860 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-57860 exists.

Sources

Also known as GHSA-6p2j-g97c-79wf.

Is CVE-2026-57860 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free