GHSA-7PWQ-Q9JF-539H

Vulnerability from github – Published: 2026-08-18 20:09 – Updated: 2026-08-18 20:09
VLAI
Summary
kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)
Details

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

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

Credits

Reported and fixed by Ahmed Al Hafoudh.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.9.0"
      },
      "package": {
        "ecosystem": "RubyGems",
        "name": "kobako"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.1.0"
            },
            {
              "fixed": "0.9.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-55107"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-470",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-18T20:09:59Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "### Summary\nA guest mruby script running inside the Kobako sandbox can execute arbitrary\nRuby in the host process, fully escaping the sandbox.\n\n### Details\nA host embeds bound \"Service\" objects that guest scripts call across the wasm\nboundary through the transport dispatcher. The dispatcher passed the\nguest-supplied method name straight to `Object#public_send` on the bound\nobject, with no restriction to the object\u0027s own methods:\n\n```ruby\ntarget.public_send(method.to_sym, *args, **kwargs, \u0026block)\n```\n\n`public_send` can invoke any public method, including Ruby\u0027s ambient\nreflection surface. A guest pivots through the public `send` into otherwise\nprivate Kernel methods: a dispatch request with `method = \"send\"` and\n`args = [:eval, \"\u003cruby\u003e\"]` evaluates to `target.send(:eval, \"\u003cruby\u003e\")`,\nrunning attacker-controlled Ruby in the host. Any bound Service object is\nsufficient \u2014 no Service-specific behavior is required.\n\n### Proof of Concept\nA guest call equivalent to:\n\n```\nService.send(:eval, \"\u003carbitrary host ruby\u003e\")\n```\n\nexecutes in the host process and can read or modify host state, spawn\nprocesses, and so on.\n\n### Impact\nComplete sandbox escape leading to remote code execution in the host process,\ndefeating the gem\u0027s central guarantee of isolating untrusted mruby scripts.\nAny deployment that runs untrusted or attacker-influenced scripts is affected.\nAll released versions (0.1.0 through 0.9.0) are vulnerable; the dispatcher\ncarried the same unguarded `public_send` sink under three successive names\n(`registry` \u2192 `rpc` \u2192 `transport`).\n\n### Patches\nFixed in 0.9.1. The dispatcher now rejects any method whose resolved owner is\na core/meta module (`BasicObject`, `Kernel`, `Object`, `Module`, `Class`), so\nonly methods the bound object itself defines \u2014 or dynamically handles via\n`method_missing` \u2014 remain reachable. The ambient reflection methods (`send`,\n`__send__`, `public_send`, `instance_eval`, `instance_exec`, `method`,\n`instance_variable_get`, \u2026) are all owned by those modules and are blocked.\n\n### Workarounds\nNone within the affected versions. Until you can upgrade, do not bind any\nhost Service object into a sandbox that runs untrusted scripts. Upgrade to\n0.9.1.\n\n### References\n- GHSA-7pwq-q9jf-539h\n- Fix commit: 64f8470\n\n### Credits\nReported and fixed by Ahmed Al Hafoudh.",
  "id": "GHSA-7pwq-q9jf-539h",
  "modified": "2026-08-18T20:09:59Z",
  "published": "2026-08-18T20:09:59Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/elct9620/kobako/security/advisories/GHSA-7pwq-q9jf-539h"
    },
    {
      "type": "WEB",
      "url": "https://github.com/elct9620/kobako/commit/64f84700c81f44902bed9211318d5362f44987b3"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/elct9620/kobako"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "kobako Sandbox Escape: guest eval reaches host RCE via method_missing \u2192 public_send (any bound Service)"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…