Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker identifies exposed code-mcp server
-
DeliveryCrafts malicious RPC/API request with injected shell commands in operation argument
-
ExploitSends request to code-mcp network endpoint
-
Installgit_operation function parses operation without sanitization
-
C2Shell command executes with injected payload
-
ExecuteArbitrary system command runs under code-mcp process privileges
-
ImpactData exfiltration or lateral movement initiated
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Command injection prevention
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Remote attackers must have network access to the code-mcp MCP server port (typically network-accessible if deployed as a service). No authentication or special configuration is required - the vulnerability exists in the default code-mcp implementation. The exploit works against all deployment modes since the vulnerable git_operation function lacks input validation by design. The only limiting factor is network reachability; if code-mcp is deployed only on isolated internal networks or behind a firewall blocking the MCP port, exploitation risk is significantly reduced. |
| Impact | CVSS 5.5 with AV:N/AC:L/PR:N/UI:N indicates network-accessible unauthenticated remote exploitation with low complexity, but the CVSSv4 score reflects limited confidentiality, integrity, and availability impact (VC:L/VI:L/VA:L with no scope change). The exploit proof indicator (E:P) and publicly available POC elevate real-world risk despite moderate CVSS. However, the practical impact is constrained by CVSS data showing no direct system impact (SA:N/SI:N) - exploitation likely grants code execution only within the MCP process context, not across the full system. The continuous delivery model and lack of vendor response create indefinite exposure for existing installations. No EPSS or KEV status provided; cross-referencing VulDB reporting suggests the issue is known but not yet in active exploitation datasets at scale. The moderate CVSS combined with available POC but no active KEV listing suggests this is a real but not immediately critical priority - organizations running code-mcp should patch, but this is not a widespread zero-day scenario. |
| Exploit ScenarioDerived | An attacker sends a crafted RPC or HTTP request to the code-mcp server with an operation argument containing shell metacharacters such as 'clone;rm -rf /' or 'clone$(malicious_command)'. The git_operation function constructs a shell command incorporating this input without sanitization and executes it via subprocess or os.system. The injected command executes with the privileges of the code-mcp process, allowing the attacker to read files, modify repositories, exfiltrate data, or pivot to other systems on the network. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Command injection in code-mcp's git_operation function allows remote attackers to execute arbitrary system commands by manipulating the operation argument. The vulnerability affects all versions up to commit 4cfc4643541a110c906d93635b391bf7e357f4a8 and has publicly available exploit code. Continuous delivery model means no versioned releases exist, complicating patching timelines.
RemediationAI
Pull the latest commit from the main repository (https://github.com/54yyyu/code-mcp/) to obtain any available fixes; however, vendor response is pending as of the report date. The recommended immediate mitigation is to restrict network access to the code-mcp MCP server to trusted internal networks only, blocking direct remote exposure. Implement input validation by whitelist-matching the operation argument against a fixed set of allowed git subcommands (e.g., 'clone', 'pull', 'push', 'fetch') and reject any operation containing shell metacharacters (|, ;, &, $, `, parentheses, redirects). This validation must occur in the git_operation function before any command construction. Alternatively, refactor git_operation to use Python's subprocess module with shell=False and pass arguments as a list rather than concatenating strings - this prevents shell injection entirely. Monitor the GitHub issue (https://github.com/54yyyu/code-mcp/issues/5) for vendor patches. Until a patched version is available, isolate code-mcp instances to air-gapped or segmented networks.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The MCP Tool component in src/code_mcp/server.py implements a git_operation function that processes user-supplied operation arguments without proper sanitization. This is a classic CWE-77 (Improper Neutralization of Special Elements used in a Command) vulnerability where unsanitized input is passed to shell execution, likely via Python's subprocess or os.system calls. The git_operation function likely constructs shell commands dynamically using the operation parameter, enabling injection of arbitrary commands within the git execution context. The remote network attack vector indicates the MCP server exposes this functionality via network-accessible RPC or API endpoints.
Know when Code Mcp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Primary rating from Vendor (VulDB) · only source for this CVE.
CVSS VectorVendor: VulDB
Lifecycle Timeline
2DescriptionCVE.org
A vulnerability was found in 54yyyu code-mcp up to 4cfc4643541a110c906d93635b391bf7e357f4a8. The impacted element is the function git_operation of the file src/code_mcp/server.py of the component MCP Tool. Performing a manipulation of the argument operation results in command injection. The attack can be initiated remotely. The exploit has been made public and could be used. Continious delivery with rolling releases is used by this product. Therefore, no version details of affected nor updated releases are available. The project was informed of the problem early through an issue report but has not responded yet.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
EUVD-2026-27217
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB