CVE-2026-81097
8.4maquina-app · rails-mcp-server
The execute_ruby tool in rails-mcp-server fails to properly sanitize process-spawning methods, allowing attackers to escape the sandbox and execute arbitrary OS commands.
Executive summary
A critical security flaw in rails-mcp-server allows unauthenticated attackers to bypass sandbox protections and achieve arbitrary OS command execution.
Vulnerability
The vulnerability is an OS command injection (CWE-78) flaw stemming from the failure to include pseudo-terminal library spawn entry points in the execute_ruby tool's security denylist. This allows an unauthenticated user to invoke system commands outside the intended read-only Ruby sandbox.
Business impact
This vulnerability carries a CVSS score of 8.4, reflecting a high-severity risk to system integrity and confidentiality. Successful exploitation allows an attacker to execute arbitrary commands with the privileges of the server process, potentially leading to full system compromise, lateral movement within the network, or the exfiltration of sensitive configuration and data.
Remediation
Immediate Action: Upgrade to version 1.6.1 or later to implement strict data-only requirements, or migrate to version 2.0.0 where the vulnerable tool is removed.
Proactive Monitoring: Review system process logs and audit server activity for suspicious shell spawning or unauthorized command-line execution patterns originating from the application.
Compensating Controls: Ensure the rails-mcp-server process runs with the least privilege necessary, and utilize host-based intrusion detection systems to monitor for anomalous child processes spawned by the Ruby interpreter.
Exploitation status
Public Exploit Available: No (There is no confirmed public exploit or weaponized code available in the provided data).
Analyst recommendation
Given the high CVSS score and the potential for full command execution, this vulnerability poses a severe threat to the stability and security of the hosting environment. Organizations should prioritize patching to version 1.6.1 or higher immediately to eliminate the risk of sandbox escape. If patching is not immediately feasible, restrict access to the affected service until the update can be applied.
Sources
Originally found and disclosed by Avishai Gonen (Pluto Security), per the CVE Program record.