Skip to content

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

Critical severity GitHub Reviewed Published Jun 11, 2026 in elct9620/kobako • Updated Aug 18, 2026

Package

bundler kobako (RubyGems)

Affected versions

>= 0.1.0, <= 0.9.0

Patched versions

0.9.1

Description

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:

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
(registryrpctransport).

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

Credits

Reported and fixed by Ahmed Al Hafoudh.

References

@elct9620 elct9620 published to elct9620/kobako Jun 11, 2026
Published to the GitHub Advisory Database Aug 18, 2026
Reviewed Aug 18, 2026
Last updated Aug 18, 2026

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

EPSS score

Weaknesses

Improper Control of Generation of Code ('Code Injection')

The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. Learn more on MITRE.

Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code. Learn more on MITRE.

CVE ID

CVE-2026-55107

GHSA ID

GHSA-7pwq-q9jf-539h

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.