{"id":"CVE-2026-55107","aliases":["GHSA-7pwq-q9jf-539h"],"title":"kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)","summary":"kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)","severity":"critical","cvss":10,"cwe":["CWE-94","CWE-470"],"vendor":"kobako","product":"kobako","ecosystem":"rubygems","affected":["kobako >= 0.1.0, <= 0.9.0"],"patched":["kobako 0.9.1"],"published":"2026-08-18","updated":"2026-08-18","source":"GHSA","sourceUrl":"https://github.com/advisories/GHSA-7pwq-q9jf-539h","references":[{"url":"https://github.com/elct9620/kobako/security/advisories/GHSA-7pwq-q9jf-539h"},{"url":"https://github.com/elct9620/kobako/commit/64f84700c81f44902bed9211318d5362f44987b3"},{"url":"https://github.com/advisories/GHSA-7pwq-q9jf-539h"}],"tags":["ghsa","rubygems"],"ingestedAt":"2026-08-18T20:22:15.701Z","slug":"CVE-2026-55107","body":"## Overview\n\n### 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's own methods:\n\n```ruby\ntarget.public_send(method.to_sym, *args, **kwargs, &block)\n```\n\n`public_send` can invoke any public method, including Ruby's 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, \"<ruby>\"]` evaluates to `target.send(:eval, \"<ruby>\")`,\nrunning attacker-controlled Ruby in the host. Any bound Service object is\nsufficient — no Service-specific behavior is required.\n\n### Proof of Concept\nA guest call equivalent to:\n\n```\nService.send(:eval, \"<arbitrary host ruby>\")\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's 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` → `rpc` → `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 — or dynamically handles via\n`method_missing` — remain reachable. The ambient reflection methods (`send`,\n`__send__`, `public_send`, `instance_eval`, `instance_exec`, `method`,\n`instance_variable_get`, …) 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.\n\n## Affected packages\n\n- `kobako >= 0.1.0, <= 0.9.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `kobako 0.9.1`","depth":"midnight","depthScore":55,"depthScoreParts":{"impact":55,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}