CVE-2026-47751: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in anthropics claude-code-action
Claude Code Action versions prior to 1.0.74 contain an OS command injection vulnerability. This occurs because the action checks out attacker-controlled pull request head branches and reads a .mcp.json file from the working directory without proper validation. An attacker opening a malicious pull request with a crafted .mcp.json file could execute arbitrary code on the GitHub Actions runner and potentially exfiltrate secrets accessible to the workflow. The issue is fixed in version 1.0.74 by restoring .claude/ and .mcp.json from the pull request base branch before running the CLI.
AI Analysis
Technical Summary
The vulnerability in anthropics claude-code-action (CVE-2026-47751) is an OS command injection (CWE-78) caused by the action checking out attacker-controlled pull request head branches and unconditionally enabling all project MCP servers via enableAllProjectMcpServers. This allows an attacker who submits a pull request containing a malicious .mcp.json file to execute arbitrary code on the GitHub Actions runner and exfiltrate secrets such as API keys and tokens. The flaw exists in versions prior to 1.0.74. The fix in 1.0.74 mitigates the issue by restoring .claude/ and .mcp.json from the pull request base branch before executing the CLI, preventing attacker-controlled files from influencing the runtime environment.
Potential Impact
An attacker who can open a pull request can execute arbitrary code on the GitHub Actions runner with the privileges of the workflow. This can lead to secret exfiltration, including API keys and tokens accessible to the workflow. The vulnerability affects the confidentiality and integrity of the CI/CD environment and potentially downstream systems relying on these secrets.
Mitigation Recommendations
Upgrade to version 1.0.74 or later, which includes a fix that restores .claude/ and .mcp.json from the pull request base branch before running the CLI, preventing attacker-controlled files from being used. No other mitigation is indicated. Patch status is not explicitly confirmed in the vendor advisory, but the description states the issue is fixed in 1.0.74.
CVE-2026-47751: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in anthropics claude-code-action
Description
Claude Code Action versions prior to 1.0.74 contain an OS command injection vulnerability. This occurs because the action checks out attacker-controlled pull request head branches and reads a .mcp.json file from the working directory without proper validation. An attacker opening a malicious pull request with a crafted .mcp.json file could execute arbitrary code on the GitHub Actions runner and potentially exfiltrate secrets accessible to the workflow. The issue is fixed in version 1.0.74 by restoring .claude/ and .mcp.json from the pull request base branch before running the CLI.
CVSS v4.0
Score 5.3medium
Affected software
pkg:github/anthropics/claude-code-actionRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in anthropics claude-code-action (CVE-2026-47751) is an OS command injection (CWE-78) caused by the action checking out attacker-controlled pull request head branches and unconditionally enabling all project MCP servers via enableAllProjectMcpServers. This allows an attacker who submits a pull request containing a malicious .mcp.json file to execute arbitrary code on the GitHub Actions runner and exfiltrate secrets such as API keys and tokens. The flaw exists in versions prior to 1.0.74. The fix in 1.0.74 mitigates the issue by restoring .claude/ and .mcp.json from the pull request base branch before executing the CLI, preventing attacker-controlled files from influencing the runtime environment.
Potential Impact
An attacker who can open a pull request can execute arbitrary code on the GitHub Actions runner with the privileges of the workflow. This can lead to secret exfiltration, including API keys and tokens accessible to the workflow. The vulnerability affects the confidentiality and integrity of the CI/CD environment and potentially downstream systems relying on these secrets.
Mitigation Recommendations
Upgrade to version 1.0.74 or later, which includes a fix that restores .claude/ and .mcp.json from the pull request base branch before running the CLI, preventing attacker-controlled files from being used. No other mitigation is indicated. Patch status is not explicitly confirmed in the vendor advisory, but the description states the issue is fixed in 1.0.74.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-19T22:16:39.505Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a5907ce68715ace4356ca70
Added to database: 07/16/2026, 16:33:18 UTC
Last enriched: 07/16/2026, 16:49:02 UTC
Last updated: 07/16/2026, 23:33:04 UTC
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.