The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-7812

CVE-2026-7812: code-mcp RCE Vulnerability

CVE-2026-7812 is a remote code execution flaw in code-mcp that enables command injection through the git_operation function. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: May 7, 2026

CVE-2026-7812 Overview

CVE-2026-7812 is a command injection vulnerability in the 54yyyu code-mcp project, a Model Context Protocol (MCP) tool implementation. The flaw resides in the git_operation function within src/code_mcp/server.py. Attackers can manipulate the operation argument to inject arbitrary operating system commands. The issue is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component. The exploit has been disclosed publicly and can be triggered remotely without authentication. Because the project follows a continuous delivery model with rolling releases, no specific affected or fixed version identifiers are available.

Critical Impact

Remote attackers can inject arbitrary commands through the operation parameter of the MCP git_operation tool, leading to unauthorized command execution on the host running the MCP server.

Affected Products

  • 54yyyu code-mcp up to commit 4cfc4643541a110c906d93635b391bf7e357f4a8
  • Component: MCP Tool — git_operation function in src/code_mcp/server.py
  • Distribution model: continuous delivery with rolling releases (no discrete versioning)

Discovery Timeline

  • 2026-05-05 - CVE-2026-7812 published to NVD
  • 2026-05-05 - Last updated in NVD database

Technical Details for CVE-2026-7812

Vulnerability Analysis

The vulnerability exists in the git_operation function exposed by the MCP server in src/code_mcp/server.py. The function accepts an operation argument intended to specify a Git action. The implementation passes this argument into a downstream command execution path without sufficient neutralization of shell metacharacters or command separators. As a result, an attacker controlling the value of operation can append additional commands that the host shell will interpret and execute.

MCP servers act as bridges between AI assistants and local developer tooling. A successful exploit therefore enables an attacker to run shell commands within the runtime context of the MCP host process, with the privileges of that process.

Root Cause

The root cause is improper neutralization of input passed to a command interpreter, consistent with [CWE-74]. The git_operation handler treats attacker-controllable input as part of a command string rather than a discrete argument. Without strict allowlisting, argument array construction, or shell escaping, the operation parameter becomes a direct injection sink.

Attack Vector

The attack vector is network-reachable when the MCP tool is exposed to a client capable of invoking the git_operation tool with attacker-supplied parameters. The attacker submits a crafted operation value that contains shell metacharacters such as ;, &&, |, or backticks. The injected payload executes alongside or in place of the intended Git command. No authentication is required, and user interaction is not necessary to trigger the flaw. The exploit has been made public, increasing the likelihood of opportunistic abuse against exposed instances.

No verified proof-of-concept code is reproduced here. See the GitHub Issue Tracker and the VulDB Vulnerability Detail for technical references.

Detection Methods for CVE-2026-7812

Indicators of Compromise

  • Unexpected child processes spawned by the code-mcp server process, particularly shells (/bin/sh, bash, cmd.exe) launched outside of normal Git workflows.
  • MCP request payloads to the git_operation tool containing shell metacharacters such as ;, |, &&, $(), or backticks in the operation field.
  • Outbound network connections originating from the MCP host to unfamiliar destinations shortly after git_operation invocations.
  • New or modified files in the repository working directory or user home directory that do not correspond to legitimate Git activity.

Detection Strategies

  • Enable verbose logging of all MCP tool invocations and capture the full operation argument for retrospective inspection.
  • Apply process-tree analytics to flag any descendants of the code-mcp Python process that are not git itself.
  • Inspect HTTP or stdio transport traffic to the MCP server for parameter values containing command separators or substitution syntax.

Monitoring Recommendations

  • Forward MCP server logs and host endpoint telemetry to a centralized analytics platform for correlation.
  • Alert on Python interpreter processes invoking os.system, subprocess with shell=True, or spawning interactive shells.
  • Track baseline command frequencies for the MCP host and alert on deviations following deployments or configuration changes.

How to Mitigate CVE-2026-7812

Immediate Actions Required

  • Restrict network exposure of the code-mcp server to trusted local clients only; do not expose it to untrusted networks.
  • Run the MCP server under a dedicated low-privilege user account with no write access to sensitive repositories or credentials.
  • Audit recent git_operation invocations for suspicious operation values and investigate any anomalies.
  • Track the upstream GitHub Issue Tracker for maintainer response and pull the latest commit once a fix is published.

Patch Information

No patch is currently available. The maintainer of 54yyyu/code-mcp was notified through an issue report but has not responded at the time of disclosure. Because the project uses rolling releases, remediation will require pulling the upstream commit that addresses the injection once published. Monitor the GitHub Code Repository for fix commits.

Workarounds

  • Disable or remove the git_operation tool from the MCP server configuration until a fix is released.
  • If self-maintaining a fork, replace shell-based command execution in git_operation with subprocess.run using an argument list and shell=False, and validate operation against a strict allowlist of permitted Git subcommands.
  • Sandbox the MCP server using container isolation, seccomp, or AppArmor profiles to limit the impact of command execution.
  • Apply egress network filtering on the MCP host to constrain exfiltration paths if exploitation occurs.
bash
# Example hardening: run code-mcp inside a restricted container with no shell access
docker run --rm \
  --user 65534:65534 \
  --read-only \
  --cap-drop=ALL \
  --security-opt=no-new-privileges \
  --network=none \
  -v /srv/repos:/repos:ro \
  code-mcp:pinned-commit

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMcp Tool

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability1.04%

  • Known ExploitedNo
  • CVSS Vector
  • 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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-74
  • Technical References
  • GitHub Code Repository

  • GitHub Issue Tracker

  • VulDB Submission Report

  • VulDB Vulnerability Detail

  • VulDB Cyber Threat Intelligence
  • Related CVEs
  • CVE-2026-7150: Auto-Favicon SSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English