Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

774+ Articles
120+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-6942: radare2-mcp OS Command Injection via Shell Metacharacter Filter Bypass
CVE-2026-6942: radare2-mcp OS Command Injection via Shell Metacharacter Filter Bypass

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2026-6942

CVE-2026-6942: radare2-mcp OS Command Injection via Shell Metacharacter Filter Bypass

A critical OS command injection vulnerability in radare2-mcp 1.6.0 and earlier allows remote attackers to execute arbitrary commands by bypassing the command filter through shell metacharacters injected into r2_cmd_str().

Dylan H.

Security Team

April 24, 2026
5 min read

Affected Products

  • radare2-mcp 1.6.0 and earlier

Executive Summary

A critical OS command injection vulnerability (CVE-2026-6942) has been disclosed in radare2-mcp, the Model Context Protocol server for the radare2 reverse engineering framework. The flaw carries a CVSS score of 9.8 and affects versions 1.6.0 and earlier. Remote attackers can bypass the tool's command filter by injecting shell metacharacters into user-controlled input passed to the r2_cmd_str() function, enabling arbitrary operating system command execution without authentication.


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-6942
CVSS Score9.8 (Critical)
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
Affected Softwareradare2-mcp 1.6.0 and earlier
Vulnerability TypeOS Command Injection (CWE-78)
PublishedApril 23, 2026

Affected Products

ProductAffected Versions
radare2-mcp1.6.0 and earlier

Technical Analysis

Root Cause

The vulnerability resides in the command filter logic within radare2-mcp, which exposes radare2 reverse engineering capabilities via the Model Context Protocol (MCP). The server accepts user-controlled input and passes it to r2_cmd_str() — radare2's command execution interface — without properly sanitizing or escaping shell metacharacters.

The filter designed to prevent command injection can be bypassed using standard Unix shell metacharacters such as ;, |, &&, $(...), and backtick substitution. An attacker who can reach the MCP server endpoint can inject these characters alongside legitimate radare2 commands, causing the underlying shell to interpret the injected payload as a separate command sequence.

Attack Vector

radare2-mcp serves as an MCP server that allows AI agents and tooling to interact with radare2 for binary analysis. When this server is exposed on a network interface (its default binding behavior in balance_serve or equivalent modes), any reachable client can send crafted MCP requests containing malicious input.

1. Attacker identifies an exposed radare2-mcp endpoint
2. Attacker sends an MCP request with shell metacharacters in the command parameter
   Example: legitimate_cmd; malicious_os_command
3. radare2-mcp passes the input to r2_cmd_str() without proper sanitization
4. The shell interprets the injected payload after the metacharacter boundary
5. Arbitrary OS commands execute under the privileges of the radare2-mcp process

Why CVSS 9.8

MetricValueReason
NetworkAV:NExploitable over any network connection to the MCP server
No authenticationPR:NNo credentials required to send MCP requests
No user interactionUI:NFully server-side exploitation
Full C/I/A impactH/H/HArbitrary command execution yields complete host compromise

Impact Assessment

radare2-mcp is increasingly deployed in AI-assisted reverse engineering workflows, where LLMs and AI agents interact with radare2 to analyze binaries. These environments often run with elevated privileges or in sensitive security research contexts.

Impact AreaDescription
Arbitrary Code ExecutionFull OS command execution under the server's process privileges
Data ExfiltrationAccess to files, environment variables, credentials, and secrets on the host
Lateral MovementUse of compromised host as a pivot point within security research networks
Research Environment CompromiseSensitive reverse engineering data and analyzed binaries at risk
AI Pipeline PoisoningIf integrated with AI tooling, compromised analysis results could poison downstream decisions

Remediation

Step 1: Update radare2-mcp

Upgrade to a patched version of radare2-mcp that has addressed CVE-2026-6942. Check the project's GitHub releases or package registry for the latest patched release.

# If installed via pip
pip install --upgrade radare2-mcp
 
# If installed via npm
npm update radare2-mcp
 
# Verify installed version
pip show radare2-mcp | grep Version

Step 2: Restrict Network Exposure

If a patched version is not yet available or immediate upgrade is not possible:

# Bind the MCP server to localhost only
# Do NOT expose radare2-mcp on 0.0.0.0 or external interfaces
 
# Firewall: block external access to radare2-mcp port
sudo ufw deny from any to any port <mcp_port>
sudo ufw allow from 127.0.0.1 to any port <mcp_port>

Step 3: Principle of Least Privilege

Run radare2-mcp under a dedicated low-privilege service account:

# Create a restricted service user
sudo useradd -r -s /bin/false radare2-mcp-svc
 
# Run radare2-mcp as this user
sudo -u radare2-mcp-svc radare2-mcp

Step 4: Input Validation (Upstream Fix Guidance)

Upstream maintainers should implement strict allowlist-based command validation rather than denylist-based filter bypass protection. All user-controlled input must be escaped or validated before being passed to r2_cmd_str().


Detection Indicators

IndicatorDescription
Unexpected child processes spawned by radare2-mcpPossible command injection exploitation
Unusual network connections from the radare2-mcp processReverse shell or C2 beaconing
Access to files outside expected binary analysis directoriesPost-exploitation data access
Shell metacharacters in MCP server request logsInjection attempt indicators
New user accounts or cron jobs created on hostPost-exploitation persistence

Post-Remediation Checklist

  1. Update radare2-mcp to the latest patched release
  2. Restrict radare2-mcp binding to localhost or trusted interfaces only
  3. Audit recent MCP server request logs for shell metacharacter injection attempts
  4. Review process spawn history for unexpected child processes from radare2-mcp
  5. Rotate any credentials or API keys accessible to the radare2-mcp process environment
  6. Apply least-privilege service account for radare2-mcp
  7. Monitor network connections from the radare2-mcp host for unusual outbound traffic

References

  • NVD — CVE-2026-6942
  • radare2-mcp Project Repository
#CVE-2026-6942#radare2#MCP#Command Injection#RCE#CVSS 9.8#Shell Metacharacter#r2_cmd_str

Related Articles

CVE-2026-26210: KTransformers Unsafe Deserialization RCE via Unauthenticated ZMQ RPC

KTransformers through version 0.5.3 contains a critical unsafe deserialization vulnerability in its balance_serve backend mode, where an unauthenticated ZMQ ROUTER socket exposes arbitrary code execution to any network-reachable attacker.

6 min read

CVE-2025-15379: MLflow Command Injection in Model Serving (CVSS 10.0)

A maximum-severity command injection vulnerability in MLflow's model serving container initialization allows attackers to execute arbitrary OS commands...

6 min read

CVE-2026-21992: Critical Oracle Identity Manager Unauthenticated RCE via REST WebServices

Oracle's March 2026 Critical Patch Update includes CVE-2026-21992, a CVSS 9.8 unauthenticated remote code execution vulnerability in Oracle Identity...

7 min read
Back to all Security Alerts