CVE-2026-24116
JSON

4.1medium

Wasmtime segfault or unused out-of-sandbox load with f64.copysign operator on x86-64

Severity
4.1medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.24% (higher than 16% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-vc8c-j3xm-xj73RUSTSEC-2026-0006

Description

Wasmtime is a runtime for WebAssembly. Starting in version 29.0.0 and prior to version 36.0.5, 40.0.3, and 41.0.1, on x86-64 platforms with AVX, Wasmtime's compilation of the `f64.copysign` WebAssembly instruction with Cranelift may load 8 more bytes than is necessary. When signals-based-traps are disabled this can result in a uncaught segfault due to loading from unmapped guard pages. With guard pages disabled it's possible for out-of-sandbox data to be loaded, but unless there is another bug in Cranelift this data is not visible to WebAssembly guests. Wasmtime 36.0.5, 40.0.3, and 41.0.1 have been released to fix this issue. Users are recommended to upgrade to the patched versions of Wasmtime. Other affected versions are not patched and users should updated to supported major version instead. This bug can be worked around by enabling signals-based-traps. While disabling guard pages can be a quick fix in some situations, it's not recommended to disabled guard pages as it is a key defense-in-depth measure of Wasmtime.

Affected

Product or packageVersionsReported by
bytecodealliance wasmtime>= 29.0.0, < 36.0.5, >= 37.0.0, < 40.0.3, = 41.0.0, from 29.0.0 before 36.0.5, from 40.0.0 before 40.0.3, from 41.0.0 before 41.0.1CVE List, NVD
wasmtime (crates.io)from 29.0.0 before 36.0.5, from 37.0.0 before 40.0.3, from 41.0.0 before 41.0.1GitHub Advisory Database, RustSec Advisory Database

All scores

GitHub_M4.1medium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
RustSec Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Classification

CWE-125

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Wasmtime is a runtime for WebAssembly. Starting in version 29.0.0 and prior to version 36.0.5, 40.0.3, and 41.0.1, on x86-64 platforms with AVX, Wasmtime's compilation of the `f64.copysign` WebAssembly instruction with Cranelift may load 8 more bytes than is necessary. When signals-based-traps are disabled this can result in a uncaught segfault due to loading from unmapped guard pages. With guard pages disabled it's possible for out-of-sandbox data to be loaded, but unless there is another bug in Cranelift this data is not visible to WebAssembly guests. Wasmtime 36.0.5, 40.0.3, and 41.0.1 have been released to fix this issue. Users are recommended to upgrade to the patched versions of Wasmtime. Other affected versions are not patched and users should updated to supported major version instead. This bug can be worked around by enabling signals-based-traps. While disabling guard pages can be a quick fix in some situations, it's not recommended to disabled guard pages as it is a key defense-in-depth measure of Wasmtime.

GitHub Advisory Database

On x86-64 platforms with AVX Wasmtime's compilation of the f64.copysign WebAssembly instruction with Cranelift may load 8 more bytes than is necessary. When signals-based-traps are disabled this can result in a uncaught segfault due to loading from unmapped guard pages. With guard pages disabled it's possible for out-of-sandbox data to be loaded, but unless there is another bug in Cranelift this data is not visible to WebAssembly guests.

Details

The f64.copysign operator, when operating on a value loaded from a memory (for example with f64.load), compiles with Cranelift to code on x86-64 with AVX that loads 128 bits (16 bytes) rather than the expected 64 bits (8 bytes) from memory. When the address is in-bounds for a (correct) 8-byte load but not an (incorrect) 16-byte load, this can load beyond memory by up to 8 bytes. This can result in three different behaviors depending on Wasmtime's configuration:

  1. If guard pages are disabled then this extra data will be loaded. The extra data is present in the upper bits of a register, but the upper bits are not visible to WebAssembly guests. Actually witnessing this data would require a different bug in Cranelift, of which none are known. Thus in this situation while it's something we're patching in Cranelift it's not a security issue.
  2. If guard pages are enabled, and signals-based-traps are enabled, then this operation will result in a safe WebAssembly trap. The trap is incorrect because the load is not out-of-bounds as defined by WebAssembly, but this mistakenly widened load will load bytes from an unmapped guard page, causing a segfault which is caught and handled as a Wasm trap. In this situation this is not a security issue, but we're patching Cranelift to fix the WebAssembly behavior.
  3. If guard pages are enabled, and signals-based-traps are disabled, then this operation results in an uncaught segfault. Like the previous case with guard pages enabled this will load from an unmapped guard page. Unlike before, however, signals-based-traps are disabled meaning that signal handlers aren't configured. The resulting segfault will, by default, terminate the process. This is a security issue from a DoS perspective, but does not represent an arbitrary read or write from WebAssembly, for example.

Wasmtime's default configuration is case (2) in this case. That means that Wasmtime, by default, incorrectly executes this WebAssembly instruction but does not have insecure behavior.

Impact

If signals-based-traps are disabled and guard pages are enabled then guests can trigger an uncaught segfault in the host, likely aborting the host process. This represents, for example, a DoS vector for WebAssembly guests.

This bug does not affect Wasmtime's default configuration and requires signals-based-traps to be disabled. This bug only affects the x86-64 target with the AVX feature enabled and the Cranelift backend (Wasmtime's default backend).

Patches

Wasmtime 36.0.5, 40.0.3, and 41.0.1 have been released to fix this issue. Users are recommended to upgrade to the patched versions of Wasmtime. Other affected versions are not patched and users should updated to supported major version instead.

Workarounds

This bug can be worked around by enabling signals-based-traps. While disabling guard pages can be a quick fix in some situations, it's not recommended to disabled guard pages as it is a key defense-in-depth measure of Wasmtime.

Resources
RustSec Advisory Database

This is an entry in the RustSec database for the Wasmtime security advisory located at https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-vc8c-j3xm-xj73 For more information see the GitHub-hosted security advisory.

NVD (es)

Wasmtime es un entorno de ejecución para WebAssembly. A partir de la versión 29.0.0 y antes de las versiones 36.0.5, 40.0.3 y 41.0.1, en plataformas x86-64 con AVX, la compilación de Wasmtime de la instrucción WebAssembly f64.copysign con Cranelift puede cargar 8 bytes más de los necesarios. Cuando las trampas basadas en señales están deshabilitadas, esto puede resultar en un segfault no detectado debido a la carga desde páginas de guardia no mapeadas. Con las páginas de guardia deshabilitadas, es posible que se carguen datos fuera de la sandbox, pero a menos que haya otro error en Cranelift, estos datos no son visibles para los invitados de WebAssembly. Wasmtime 36.0.5, 40.0.3 y 41.0.1 han sido lanzadas para solucionar este problema. Se recomienda a los usuarios actualizar a las versiones parcheadas de Wasmtime. Otras versiones afectadas no están parcheadas y los usuarios deberían actualizar a una versión principal compatible en su lugar. Este error se puede eludir habilitando las trampas basadas en señales. Si bien deshabilitar las páginas de guardia puede ser una solución rápida en algunas situaciones, no se recomienda deshabilitar las páginas de guardia, ya que es una medida clave de defensa en profundidad de Wasmtime.

References

https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-vc8c-j3xm-xj73patch, vendor-advisory, web
https://github.com/bytecodealliance/wasmtime/commit/728fa07184f8da2a046f48ef9b61f869dce133a6patch, web
https://github.com/bytecodealliance/wasmtime/commit/799585fc362fcb991de147dd1a9f2ba0861ed440patch, web
https://github.com/bytecodealliance/wasmtime/commit/ac92d9bb729ad3a6d93f0724c4c33a0c4a9c0227patch, web
https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.memory_guard_sizeproduct, web
https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.signals_based_trapsproduct, web
https://docs.wasmtime.dev/stability-release.htmlrelease-notes, web
https://rustsec.org/advisories/RUSTSEC-2026-0006.htmladvisory, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2026-24116advisory
https://github.com/bytecodealliance/wasmtimepackage
https://crates.io/crates/wasmtimepackage

Sources

SourceRecordLicence
CVE ListCVE-2026-24116 changed 2026-01-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-vc8c-j3xm-xj73 changed 2026-09-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2026-0006 changed 2026-10-12CC0-1.0
NVDCVE-2026-24116 changed 2026-06-17Public domain