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.
Published: 2026-07-17
Score: 8.4 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

ForgeCode automatically loads and executes the MCP servers defined in a repository's .mcp.json file when the CLI starts, without prompting the user. This flaw, identified as CWE-829, allows an attacker to craft the mcpServers entries to include arbitrary command and argument values, which are then spawned as processes with the invoking user's privileges. This enables an attacker to run arbitrary code on the local machine, providing high‑severity compromise and persistence for developers evaluating untrusted repositories.

Affected Systems

The vulnerability affects the TailcallHQ ForgeCode AI pair‑programming CLI. No specific product version information was provided; the issue applies to the current codebase in the GitHub repository.

Risk and Exploitability

The CVSS score of 8.4 rates this flaw as high severity. The EPSS score of less than 1% indicates a low but non‑zero probability of exploitation in the wild. It is not listed in the CISA KEV catalog. The likely vector is inferred to be a local attacker who runs ForgeCode inside a cloned untrusted repository; no network‑based attack is described. Exploitation requires the user to execute the command line tool, and thus the impact is limited to systems where the tool is run but can be catastrophic given its arbitrary execution capability.

Generated by OpenCVE AI on August 3, 2026 at 02:45 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest ForgeCode release that includes the fix available at the commit referenced in the advisory or later.
  • If upgrading is not possible, disable automatic loading of .mcp.json by setting an environment variable such as FORGECODE_DISABLE_AUTOLOAD=true or editing the configuration to prevent execution of external MCP servers.
  • Verify that the local repository does not contain malicious or untrusted .mcp.json files by manually inspecting the file or using a linting tool before running ForgeCode.

Generated by OpenCVE AI on August 3, 2026 at 02:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Tailcallhq
Tailcallhq forgecode
Vendors & Products Tailcallhq
Tailcallhq forgecode

Fri, 17 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 17 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
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.
Title ForgeCode Arbitrary Code Execution via Unvetted .mcp.json in Untrusted Repository
Weaknesses CWE-829
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.4, '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'}


Subscriptions

Tailcallhq Forgecode
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-20T17:45:55.116Z

Reserved: 2026-06-25T18:48:00.283Z

Link: CVE-2026-57860

cve-icon Vulnrichment

Updated: 2026-07-17T16:45:16.883Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T03:00:04Z

Weaknesses
  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere