<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/cve-2026-81097-rails-mcp-server-the-execute-ruby-tool-is-documented-as-a-read-only-ruby-sandbox-eisdgzriv" -->

---
title: CVE-2026-81097 (rails-mcp-server): The execute_ruby tool...
description: A high-severity vulnerability (CVE-2026-81097, CVSS 8.4) affects rails-mcp-server's execute_ruby tool, which is documented as a read-only Ruby sandbox enforced...
canonical: https://daily.dev/posts/cve-2026-81097-rails-mcp-server-the-execute-ruby-tool-is-documented-as-a-read-only-ruby-sandbox-eisdgzriv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: CVE-2026-81097 (rails-mcp-server): The execute_ruby tool is documented as a read-only Ruby sandbox | daily.dev
og:description: A high-severity vulnerability (CVE-2026-81097, CVSS 8.4) affects rails-mcp-server's execute_ruby tool, which is documented as a read-only Ruby sandbox enforced...
og:url: https://daily.dev/posts/cve-2026-81097-rails-mcp-server-the-execute-ruby-tool-is-documented-as-a-read-only-ruby-sandbox-eisdgzriv
og:image: https://api.daily.dev/og/posts/eiSDgZriV.png
og:image:alt: CVE-2026-81097 (rails-mcp-server): The execute_ruby tool is documented as a read-only Ruby sandbox
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CVE-2026-81097 (rails-mcp-server): The execute_ruby tool is documented as a read-only Ruby sandbox

**[RUBYLAND](https://daily.dev/sources/rubyla)** · 1 min read · 0 upvotes · 0 comments

## Summary

A high-severity vulnerability (CVE-2026-81097, CVSS 8.4) affects rails-mcp-server's execute_ruby tool, which is documented as a read-only Ruby sandbox enforced via a pattern denylist and replaced process-spawning Kernel methods. The pseudo-terminal library's spawn entry points were never added to the denylist, allowing a normal tool call to reach them and start a shell, executing arbitrary commands as the server's account. The flaw exists from version 1.4.0 through 1.6.0. Version 1.6.1 restricts sandbox requires to a data-only list and blocks dynamic dispatch to execution entry points, while version 2.0.0 removes the execute_ruby tool entirely.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://rubysec.com/advisories/CVE-2026-81097>

## Questions this post answers

### What is CVE-2026-81097 in rails-mcp-server and how does it work?

CVE-2026-81097 is a sandbox escape in rails-mcp-server's execute_ruby tool, which was documented as a read-only Ruby sandbox enforced by a pattern denylist and replaced Kernel process-spawning methods. The pseudo-terminal library's spawn entry points were never added to the denylist or replaced, so a normal tool call could reach them and start a shell, executing arbitrary commands as the server's account. It has a CVSS score of 8.4 and affects versions 1.4.0 through 1.6.0.

_Teams running MCP servers alongside AI coding tools can track sandbox-escape advisories like this one on daily.dev._

### Which versions of rails-mcp-server are affected by the execute_ruby sandbox escape and how do I fix it?

Versions 1.4.0 through 1.6.0 of rails-mcp-server are affected because the denylist introduced in 1.4.0 never covered pseudo-terminal spawn entry points. Version 1.6.1 patches the issue by restricting the sandbox to a data-only list of permitted requires and blocking dynamic dispatch to execution entry points. Version 2.0.0 removes the execute_ruby tool entirely.

_Developers pinning MCP server versions can watch for patch releases like this on daily.dev before upgrading._

## Similar posts on daily.dev

- [CVE-2026-0980 \(rubyipmi\): rubyipmi is vulnerable to OS Command Injection through malicious usernames](https://daily.dev/posts/cve-2026-0980-rubyipmi-rubyipmi-is-vulnerable-to-os-command-injection-through-malicious-usernames-k8okefroe) · RUBYLAND · 0 upvotes · 0 comments
- [Ruby & Rails Weekly: KindaRails2Shell Exploited, Ractor Rails](https://daily.dev/posts/ruby-rails-weekly-kindarails2shell-exploited-ractor-rails-70dte5arg) · Ruby Flow · 3 upvotes · 0 comments
- [Over 1,000 GitLab servers vulnerable to ongoing RCE attacks](https://daily.dev/posts/over-1-000-gitlab-servers-vulnerable-to-ongoing-rce-attacks-dsbgbwvkf) · BleepingComputer · 3 upvotes · 0 comments
- [guest eval reaches host RCE via method\_missing → public\_send \(any bound Service\)](https://daily.dev/posts/guest-eval-reaches-host-rce-via-method-missing-public-send-any-bound-service--4xvooxyot) · RUBYLAND · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#ruby](https://daily.dev/tags/ruby), [#mcp](https://daily.dev/tags/mcp)

[View this post on daily.dev](https://daily.dev/posts/cve-2026-81097-rails-mcp-server-the-execute-ruby-tool-is-documented-as-a-read-only-ruby-sandbox-eisdgzriv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"CVE-2026-81097 (rails-mcp-server): The execute_ruby tool is documented as a read-only Ruby sandbox","url":"https://daily.dev/posts/cve-2026-81097-rails-mcp-server-the-execute-ruby-tool-is-documented-as-a-read-only-ruby-sandbox-eisdgzriv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/cve-2026-81097-rails-mcp-server-the-execute-ruby-tool-is-documented-as-a-read-only-ruby-sandbox-eisdgzriv"},"datePublished":"2026-08-29T12:22:41.375Z","dateModified":"2026-09-13T21:36:28.317Z","description":"A high-severity vulnerability (CVE-2026-81097, CVSS 8.4) affects rails-mcp-server's execute_ruby tool, which is documented as a read-only Ruby sandbox enforced...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5fa7bf38a8a9c178c1d458f9f735556c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5fa7bf38a8a9c178c1d458f9f735556c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"RUBYLAND","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"RUBYLAND","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/rubyla","url":"https://daily.dev/sources/rubyla"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/cve-2026-81097-rails-mcp-server-the-execute-ruby-tool-is-documented-as-a-read-only-ruby-sandbox-eisdgzriv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,ruby,mcp","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"RUBYLAND","item":"https://daily.dev/sources/rubyla"},{"@type":"ListItem","position":3,"name":"CVE-2026-81097 (rails-mcp-server): The execute_ruby tool is documented as a read-only Ruby sandbox"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/cve-2026-81097-rails-mcp-server-the-execute-ruby-tool-is-documented-as-a-read-only-ruby-sandbox-eisdgzriv#faq","mainEntity":[{"@type":"Question","name":"What is CVE-2026-81097 in rails-mcp-server and how does it work?","acceptedAnswer":{"@type":"Answer","text":"CVE-2026-81097 is a sandbox escape in rails-mcp-server's execute_ruby tool, which was documented as a read-only Ruby sandbox enforced by a pattern denylist and replaced Kernel process-spawning methods. The pseudo-terminal library's spawn entry points were never added to the denylist or replaced, so a normal tool call could reach them and start a shell, executing arbitrary commands as the server's account. It has a CVSS score of 8.4 and affects versions 1.4.0 through 1.6.0. Teams running MCP servers alongside AI coding tools can track sandbox-escape advisories like this one on daily.dev."}},{"@type":"Question","name":"Which versions of rails-mcp-server are affected by the execute_ruby sandbox escape and how do I fix it?","acceptedAnswer":{"@type":"Answer","text":"Versions 1.4.0 through 1.6.0 of rails-mcp-server are affected because the denylist introduced in 1.4.0 never covered pseudo-terminal spawn entry points. Version 1.6.1 patches the issue by restricting the sandbox to a data-only list of permitted requires and blocking dynamic dispatch to execution entry points. Version 2.0.0 removes the execute_ruby tool entirely. Developers pinning MCP server versions can watch for patch releases like this on daily.dev before upgrading."}}]}
```

