CVE-2026-47751 Claude Code Action: Malicious MCP Server Configuration in PRs Enables Remote Code Execution and Secret Exfiltration

Medium 5.3 Published Updated

Attackers can execute arbitrary code and steal secrets by submitting pull requests with malicious MCP configurations to the Claude Code GitHub Action.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-47751?

CVE-2026-47751 is a medium-severity code injection vulnerability in anthropics claude-code-action, published on 16 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Claude Code Action is a general-purpose GitHub action that runs Claude Code on GitHub pull requests and issues. Prior to 1.0.74, because the action checked out attacker-controlled pull request head branches, read .mcp.json from the working directory via default setting sources, and unconditionally enabled all project MCP servers via enableAllProjectMcpServers, an attacker who opened a pull request containing a malicious .mcp.json file could achieve arbitrary code execution on the GitHub Actions runner and exfiltrate secrets available to the workflow (such as API keys and tokens) when a privileged user or an automatic trigger invoked the Claude action on the pull request. This issue is fixed in version 1.0.74, which restores .claude/ and .mcp.json from the pull request base branch before the CLI runs.

Weakness: CWE-78, CWE-200

Which versions are affected by CVE-2026-47751?

1 open source package ship an affected version, including anthropics/claude-code-action.

PackageAffectedFixed in
anthropics/claude-code-action GitHub ActionsAll versions1.0.74

How do I fix CVE-2026-47751?

Upgrade anthropics/claude-code-action to 1.0.74 or later.

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

Is CVE-2026-47751 being exploited?

There is no known exploitation of CVE-2026-47751 in the wild and no public exploit code.

Sources

Also known as GHSA-8q5r-mmjf-575q.

Is CVE-2026-47751 in your software?

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

Check your SBOMs for free