---
id: "CVE-2026-55107"
kind: "vulnerability"
aliases: ["CVE-2026-55107", "GHSA-7pwq-q9jf-539h"]
title: "kobako Sandbox Escape: guest eval reaches host RCE via method_missing \u2192 public_send (any bound Service)"
severity: "critical"
cvss: 10.0
epss: 0.00799
exploited: false
status: "open"
category: "package"
products: [{"name": "kobako", "fixed": ["0.9.1"], "affected": ">= 0.1.0, <= 0.9.0", "ecosystem": "rubygems"}]
ecosystems: ["rubygems"]
tags: ["cwe-470", "cwe-94", "kobako", "mruby", "package", "ruby", "rubygems"]
not_affected_if: ["kobako-at-0.9.1-or-later", "no-bound-services", "trusted-scripts-only"]
published_at: "2026-08-18T20:09:59+00:00"
first_seen_at: "2026-10-26T14:47:19+00:00"
updated_at: "2026-10-26T14:48:43+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-7pwq-q9jf-539h", "first_seen_at": "2026-10-26T14:47:19+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-55107", "first_seen_at": "2026-10-26T15:00:59+00:00"}]
---

# kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)

The kobako Ruby gem runs untrusted mruby scripts in a sandbox, but its dispatcher forwards guest-chosen method names to public_send on bound Service objects. A guest calling send with eval gets arbitrary Ruby execution in the host process.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- rubygems:kobako affected >= 0.1.0, <= 0.9.0 fixed 0.9.1

## How to check

- `gem list kobako` to see the installed kobako version
- Check the Gemfile.lock for `kobako` and whether its version is at least `0.1.0` and at most `0.9.0`
- Look for host code that binds Service objects into a Kobako sandbox running untrusted scripts

## Fix

- Upgrade the kobako gem to `0.9.1`
- Until upgraded, do not bind any host Service object into a sandbox that runs untrusted scripts

## Timeline

- 2026-10-26T14:47:19+00:00 ghsa https://github.com/advisories/GHSA-7pwq-q9jf-539h
- 2026-10-26T15:00:59+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-55107

## From the sources

### Summary
A guest mruby script running inside the Kobako sandbox can execute arbitrary
Ruby in the host process, fully escaping the sandbox.

### Details
A host embeds bound "Service" objects that guest scripts call across the wasm
boundary through the transport dispatcher. The dispatcher passed the
guest-supplied method name straight to `Object#public_send` on the bound
object, with no restriction to the object's own methods:

```ruby
target.public_send(method.to_sym, *args, **kwargs, &block)
```

`public_send` can invoke any public method, including Ruby's ambient
reflection surface. A guest pivots through the public `send` into otherwise
private Kernel methods: a dispatch request with `method = "send"` and
`args = [:eval, "<ruby>"]` evaluates to `target.send(:eval, "<ruby>")`,
running attacker-controlled Ruby in the host. Any bound Service object is
sufficient — no Service-specific behavior is required.

### Proof of Concept
A guest call equivalent to:

```
Service.send(:eval, "<arbitrary host ruby>")
```

executes in the host process and can read or modify host state, spawn
processes, and so on.

### Impact
Complete sandbox escape leading to remote code execution in the host process,
defeating the gem's central guarantee of isolating untrusted mruby scripts.
Any deployment that runs untrusted or attacker-influenced scripts is affected.
All released versions (0.1.0 through 0.9.0) are vulnerable; the dispatcher
carried the same unguarded `public_send` sink under three successive names
(`registry` → `rpc` → `transport`).

### Patches
Fixed in 0.9.1. The dispatcher now rejects any method whose resolved owner is
a core/meta module (`BasicObject`, `Kernel`, `Object`, `Module`, `Class`), so
only methods the bound object itself defines — or dynamically handles via
`method_missing` — remain reachable. The ambient reflection methods (`send`,
`__send__`, `public_send`, `instance_eval`, `instance_exec`, `method`,
`instance_variable_get`, …) are all owned by those modules and are blocked.

### Workarounds
None within the affected versions. Until you can upgrade, do not bind any
host Service object into a sandbox that runs untrusted scripts. Upgrade to
0.9.1.

### References
- GHSA-7pwq-q9jf-539h
- Fix commit: 64f8470

### Credits
Reported and fixed by Ahmed Al Hafoudh.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
