Skip to main content

code-mcp CVE-2026-7812

| EUVDEUVD-2026-27217 MEDIUM
Command Injection (CWE-77)
2026-05-05 VulDB
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker identifies exposed code-mcp server
  2. Delivery
    Crafts malicious RPC/API request with injected shell commands in operation argument
  3. Exploit
    Sends request to code-mcp network endpoint
  4. Install
    git_operation function parses operation without sanitization
  5. C2
    Shell command executes with injected payload
  6. Execute
    Arbitrary system command runs under code-mcp process privileges
  7. Impact
    Data 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 1.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

code-mcp 4cfc4643541a110c906d93635b391bf7e357f4a8

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

Vendor (VulDB) PRIMARY 5.5 MEDIUM
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Severity Changed
May 05, 2026 - 05:22 NVD
HIGH MEDIUM
CVSS changed
May 05, 2026 - 05:22 NVD
7.3 (HIGH) 5.5 (MEDIUM)

DescriptionCVE.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

EPSS Score
1.0%
Top 22% exploitable
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 1.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +28
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy