Externref results may be stale references
Published: October 27, 2026
SECURITY IDENTIFIERS
- GHSA: GHSA-c9f2-f4vx-xq68
- Vendor Advisory: https://github.com/bytecodealliance/wasmtime-rb/security/advisories/GHSA-c9f2-f4vx-xq68
GEM
SEVERITY
CVSS v3.x: 7.5 (High)
PATCHED VERSIONS
~> 36.0.1
~> 48.0.2
>= 49.0.3
DESCRIPTION
Ruby values returned from Wasmtime through externrefs from function results or hostcall arguments may be invalid references. This is due to not making the Ruby garbage collector aware that the Ruby value referenced by the externref is still in use.
Impact
Using an externref returned from a Wasm function or an externref provided as an argument to a hostcall could trigger a segmentation fault crashing the host process.
RELATED
- https://rubygems.org/gems/wasmtime/versions/36.0.1
- https://rubygems.org/gems/wasmtime/versions/48.0.2
- https://rubygems.org/gems/wasmtime/versions/49.0.3
- https://github.com/bytecodealliance/wasmtime-rb/releases/tag/v36.0.1
- https://github.com/bytecodealliance/wasmtime-rb/releases/tag/v48.0.2
- https://github.com/bytecodealliance/wasmtime-rb/releases/tag/v49.0.3
- https://github.com/bytecodealliance/wasmtime-rb/security/advisories/GHSA-c9f2-f4vx-xq68
