CVE-2026-81097 rails-mcp-server 1.4.0 through 1.6.0 OS Command Execution via execute_ruby PTY Escape
Attackers can execute arbitrary OS commands via the execute_ruby tool in rails-mcp-server due to missing pseudo-terminal restrictions in the sandbox.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-81097?
CVE-2026-81097 is a high-severity command injection vulnerability in maquina-app rails-mcp-server, published on 27 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
The execute_ruby tool is documented as a read-only Ruby sandbox and is enforced by a pattern denylist together with replacements for the process-spawning methods on Kernel. The pseudo-terminal library's spawn entry points are neither in the denylist nor replaced, so a normal tool call could reach them and start a shell, executing commands as the account running the server and outside the guarded methods. The denylist was introduced with the tool in 1.4.0 and never covered those entry points through 1.6.0. Version 1.6.1 restricts the requires the sandbox permits to a data-only list and blocks dynamic dispatch to execution entry points; 2.0.0 removes the tool.
Weakness: CWE-78
Which versions are affected by CVE-2026-81097?
How do I fix CVE-2026-81097?
No fix has been published for CVE-2026-81097 yet. Limit exposure of the affected software until one is available.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-81097 being exploited?
There is no known exploitation of CVE-2026-81097 in the wild and no public exploit code.
Sources
Also known as GHSA-247c-497m-jx82.