GHSA-7pwq-q9jf-539h: Code Injection

Published Aug 18, 2026
·
Updated

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#publicsend on the bound object, with no restriction to the object's own methods:

ruby target.publicsend(method.tosym, args, kwargs, &block)

publicsend 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 publicsend 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 methodmissing — remain reachable. The ambient reflection methods (send, send, publicsend, instanceeval, instanceexec, method, instancevariableget, …) 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.

Affected Software

1 affected componentFixes available
rubygems/kobako>=0.1.0<=0.9.0
0.9.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/kobako to a version that resolves this vulnerability.

    Fixed in 0.9.1
  2. Upgrade

    Upgrade Kobako to a version that resolves this vulnerability.

    Fixed in 0.9.1Patch GHSA-7pwq-q9jf-539h
  3. Configuration

    Ensure the dispatcher rejects any method whose resolved owner is a core/meta module (BasicObject, Kernel, Object, Module, Class), blocking ambient reflection methods such as `__send__`, `public_send`, `instance_eval`, `instance_exec`, `method`, `instance_variable_get`, etc., while noting `method_missing` remains reachable.

    Kobako dispatcher method dispatch allowed methods (public_send sink) = blocked for methods whose resolved owner is a core/meta module (BasicObject, Kernel, Object, Module, Class)
  4. Compensating control

    Until you can upgrade, do not bind any Service objects that guest mruby scripts call across the wasm transport dispatcher (i.e., avoid exposing host-bound Service objects to untrusted or attacker-influenced guest scripts).

Event History

Aug 18, 2026
Advisory Published
via GitHub·08:09 PM
Data Sourced
via GitHub·08:09 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are realistically exposed?

Applications that execute untrusted or attacker-controlled mruby scripts inside a Kobako sandbox are exposed when those scripts can call a bound Service object. Any bound Service object is sufficient; exploitation does not depend on Service-specific functionality.

2

What does an attacker need to exploit this issue?

An attacker needs the ability to run a guest mruby script and invoke a bound Service object across the wasm transport dispatcher. No authentication, user interaction, or special Service method is required by the described exploit path.

3

What is the practical impact of successful exploitation?

A guest can call the public send method on a bound object and use it to reach private Kernel methods such as eval. This causes attacker-controlled Ruby to execute in the host process, with the ability to read or modify host state and spawn processes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203