Malicious MCP Server Configuration in PRs Enables Remote Code Execution and Secret Exfiltration
Medium5.3CVE-2026-47751 · Published May 20, 2026
Due to the combination of checking out PR head branches (attacker-controlled), reading `.mcp.json` from the working directory via default setting sources, and unconditionally enabling all project MCP servers via `enableAllProjectMcpServers`, it was possible for an attacker who opened a PR containing a malicious `.mcp.json` file to achieve arbitrary code execution on the GitHub Actions runner. This could lead to exfiltration of secrets available to the workflow (such as API keys and tokens) when a privileged user triggered the Claude action on the PR. Exploiting this required the ability to open a pull request against a repository using the claude-code-action and a privileged user or automatic trigger to invoke the action on that PR. Users pinned to a vulnerable version of claude-code-action are advised to update to the latest version. Users referencing anthropics/claude-code-action@v1, anthropics/claude-code-action@beta, anthropics/claude-code-action@main, or other non-pinned tags will have received this fix already Thank you to hackerone.com/reptou for reporting this issue.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| anthropics/claude-code-action Product | < 1.0.74 | 1.0.74 |
Details and references
More Anthropic advisories
All Anthropic| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Jun 13 | Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch | Medium6.0 | 2.1.163 |
| May 6 | SSH Host Key Verification Bypass Allows Man-in-the-Middle Attack on Remote Sessions | High7.4 | 1.4304.0 |
| May 6 | Local Privilege Escalation via Directory Junction in CoworkVMService | High8.5 | 1.3834.0 |
| Apr 24 | Claude SDK for TypeScript has Insecure Default File Permissions in Local Filesystem Memory Tool | Medium4.8 | 0.91.1 |
| Apr 24 | Trust Dialog Bypass via Git Worktree Spoofing Allows Arbitrary Code Execution | High7.7 | 2.1.84 |
| Apr 20 | Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace | High7.7 | 2.1.64 |