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

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

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:H/SI:H/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Jul 2026
- **Updated:** 18 Jul 2026
- **Also known as:** GHSA-8q5r-mmjf-575q

## 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 (Improper Neutralization of Special Elements used in an OS Command), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2026-47751?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `anthropics/claude-code-action` | GitHub Actions | All versions | 1.0.74 |

## How do I fix CVE-2026-47751?

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

## Is CVE-2026-47751 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-47751 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-47751 in the wild and no public exploit code.

Affected packages and fixed versions:
- anthropics/claude-code-action (GitHub Actions): affected all versions; fixed in 1.0.74

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-47751/ (Markdown: https://insights.sbomify.com/CVE-2026-47751/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-47751
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-47751
- OSV: https://osv.dev/vulnerability/CVE-2026-47751

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-47751/
Summaries are generated and may contain mistakes; the official description above is the record.
