CVE-2026-34988
JSON

2.3low

Wasmtime leaks data between pooling allocator instances

Severity
2.3low CVSS:4.0 by GitHub_M
Exploit likelihood
0.30% (higher than 24% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6wgr-89rj-399pRUSTSEC-2026-0088

Description

Wasmtime is a runtime for WebAssembly. From 28.0.0 to before 36.0.7, 42.0.2, and 43.0.1, Wasmtime's implementation of its pooling allocator contains a bug where in certain configurations the contents of linear memory can be leaked from one instance to the next. The implementation of resetting the virtual memory permissions for linear memory used the wrong predicate to determine if resetting was necessary, where the compilation process used a different predicate. This divergence meant that the pooling allocator incorrectly deduced at runtime that resetting virtual memory permissions was not necessary while compile-time determine that virtual memory could be relied upon. The pooling allocator must be in use, Config::memory_guard_size configuration option must be 0, Config::memory_reservation configuration must be less than 4GiB, and pooling allocator must be configured with max_memory_size the same as the memory_reservation value in order to exploit this vulnerability. If all of these conditions are applicable then when a linear memory is reused the VM permissions of the previous iteration are not reset. This means that the compiled code, which is assuming out-of-bounds loads will segfault, will not actually segfault and can read the previous contents of linear memory if it was previously mapped. This represents a data leakage vulnerability between guest WebAssembly instances which breaks WebAssembly's semantics and additionally breaks the sandbox that Wasmtime provides. Wasmtime is not vulnerable to this issue with its default settings, nor with the default settings of the pooling allocator, but embeddings are still allowed to configure these values to cause this vulnerability. This vulnerability is fixed in 36.0.7, 42.0.2, and 43.0.1.

Affected

Product or packageVersionsReported by
bytecodealliance wasmtime>= 28.0.0, < 36.0.7, >= 37.0.0, < 42.0.2, >= 43.0.0, < 44.0.1, from 28.0.0 before 36.0.7, from 37.0.0 before 42.0.2, 43.0.0CVE List, NVD
wasmtime (crates.io)from 28.0.0 before 36.0.7, from 37.0.0 before 42.0.2, from 43.0.0 before 43.0.1, from 0.0.0-0 before 36.0.7GitHub Advisory Database, RustSec Advisory Database

All scores

GitHub_M2.3low CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N
GitHublow CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N
RustSec Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N
NVD6.3medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N

Classification

CWE-119

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

What each source says

CVE List

Wasmtime is a runtime for WebAssembly. From 28.0.0 to before 36.0.7, 42.0.2, and 43.0.1, Wasmtime's implementation of its pooling allocator contains a bug where in certain configurations the contents of linear memory can be leaked from one instance to the next. The implementation of resetting the virtual memory permissions for linear memory used the wrong predicate to determine if resetting was necessary, where the compilation process used a different predicate. This divergence meant that the pooling allocator incorrectly deduced at runtime that resetting virtual memory permissions was not necessary while compile-time determine that virtual memory could be relied upon. The pooling allocator must be in use, Config::memory_guard_size configuration option must be 0, Config::memory_reservation configuration must be less than 4GiB, and pooling allocator must be configured with max_memory_size the same as the memory_reservation value in order to exploit this vulnerability. If all of these conditions are applicable then when a linear memory is reused the VM permissions of the previous iteration are not reset. This means that the compiled code, which is assuming out-of-bounds loads will segfault, will not actually segfault and can read the previous contents of linear memory if it was previously mapped. This represents a data leakage vulnerability between guest WebAssembly instances which breaks WebAssembly's semantics and additionally breaks the sandbox that Wasmtime provides. Wasmtime is not vulnerable to this issue with its default settings, nor with the default settings of the pooling allocator, but embeddings are still allowed to configure these values to cause this vulnerability. This vulnerability is fixed in 36.0.7, 42.0.2, and 43.0.1.

GitHub Advisory Database
Impact

Wasmtime's implementation of its pooling allocator contains a bug where in certain configurations the contents of linear memory can be leaked from one instance to the next. The implementation of resetting the virtual memory permissions for linear memory used the wrong predicate to determine if resetting was necessary, where the compilation process used a different predicate. This divergence meant that the pooling allocator incorrectly deduced at runtime that resetting virtual memory permissions was not necessary while compile-time determine that virtual memory could be relied upon.

Exposing this bug requires specific configuration values to be used. If any of these configurations are not applicable then this bug does not happen:

  • The pooling allocator must be in use.
  • The Config::memory_guard_size configuration option must be 0.
  • The Config::memory_reservation configuration must be less than 4GiB.
  • The pooling allocator must be configured with max_memory_size the same as the memory_reservation value.

If all of these conditions are applicable then when a linear memory is reused the VM permissions of the previous iteration are not reset. This means that the compiled code, which is assuming out-of-bounds loads will segfault, will not actually segfault and can read the previous contents of linear memory if it was previously mapped.

This represents a data leakage vulnerability between guest WebAssembly instances which breaks WebAssembly's semantics and additionally breaks the sandbox that Wasmtime provides. Wasmtime is not vulnerable to this issue with its default settings, nor with the default settings of the pooling allocator, but embeddings are still allowed to configure these values to cause this vulnerability.

Patches

Wasmtime 36.0.7, 42.0.2, and 43.0.1 have been issued to fix this bug. Users are recommended to update to these patched versions of Wasmtime.

Workarounds

All four conditions above must be met to be vulnerable to this bug, and users can work around this bug by adjusting any of the above conditions. For example it is strongly recommended that guard pages are configured for linear memories which would make this bug not applicable.

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-6wgr-89rj-399p For more information see the GitHub-hosted security advisory.

NVD (es)

Wasmtime es un runtime para WebAssembly. Desde la versión 28.0.0 hasta antes de las versiones 36.0.7, 42.0.2 y 43.0.1, la implementación de Wasmtime de su asignador de pooling contiene un error donde en ciertas configuraciones el contenido de la memoria lineal puede filtrarse de una instancia a la siguiente. La implementación del restablecimiento de los permisos de memoria virtual para la memoria lineal utilizó el predicado incorrecto para determinar si el restablecimiento era necesario, mientras que el proceso de compilación utilizaba un predicado diferente. Esta divergencia significó que el asignador de pooling dedujo incorrectamente en tiempo de ejecución que el restablecimiento de los permisos de memoria virtual no era necesario, mientras que en tiempo de compilación se determinó que se podía confiar en la memoria virtual. El asignador de pooling debe estar en uso, la opción de configuración Config::memory_guard_size debe ser 0, la configuración Config::memory_reservation debe ser inferior a 4GiB, y el asignador de pooling debe configurarse con max_memory_size igual al valor de memory_reservation para poder explotar esta vulnerabilidad. Si todas estas condiciones son aplicables, entonces cuando una memoria lineal es reutilizada los permisos de la VM de la iteración anterior no se restablecen. Esto significa que el código compilado, que asume que las cargas fuera de límites provocarán un segfault, en realidad no provocará un segfault y podrá leer el contenido anterior de la memoria lineal si esta fue mapeada previamente. Esto representa una vulnerabilidad de fuga de datos entre instancias de WebAssembly invitadas, lo que rompe la semántica de WebAssembly y adicionalmente rompe el sandbox que Wasmtime proporciona. Wasmtime no es vulnerable a este problema con su configuración predeterminada, ni con la configuración predeterminada del asignador de pooling, pero las incrustaciones aún pueden configurar estos valores para causar esta vulnerabilidad. Esta vulnerabilidad se corrige en las versiones 36.0.7, 42.0.2 y 43.0.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-34988 changed 2026-04-09CVE Terms of Use
GitHub Advisory DatabaseGHSA-6wgr-89rj-399p changed 2026-09-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2026-0088 changed 2026-10-12CC0-1.0
NVDCVE-2026-34988 changed 2026-10-26Public domain