6.1medium
Wasmtime has an out-of-bounds write or crash when transcoding component model strings
- Severity
- 6.1medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.23% (higher than 14% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-394w-hwhg-8vgmRUSTSEC-2026-0091
Description
Wasmtime is a runtime for WebAssembly. Prior to 24.0.7, 36.0.7, 42.0.2, and 43.0.1, Wasmtime's implementation of transcoding strings between components contains a bug where the return value of a guest component's realloc is not validated before the host attempts to write through the pointer. This enables a guest to cause the host to write arbitrary transcoded string bytes to an arbitrary location up to 4GiB away from the base of linear memory. These writes on the host could hit unmapped memory or could corrupt host data structures depending on Wasmtime's configuration. Wasmtime by default reserves 4GiB of virtual memory for a guest's linear memory meaning that this bug will by default on hosts cause the host to hit unmapped memory and abort the process due to an unhandled fault. Wasmtime can be configured, however, to reserve less memory for a guest and to remove all guard pages, so some configurations of Wasmtime may lead to corruption of data outside of a guest's linear memory, such as host data structures or other guests's linear memories. This vulnerability is fixed in 24.0.7, 36.0.7, 42.0.2, and 43.0.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| bytecodealliance wasmtime | < 24.0.7, >= 25.0.0, < 36.0.7, >= 37.0.0, < 42.0.2, >= 43.0.0, < 44.0.1, before 24.0.7, from 25.0.0 before 36.0.7, from 37.0.0 before 42.0.2, 43.0.0 | CVE List, NVD |
| wasmtime (crates.io) | before 24.0.7, from 25.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 24.0.7 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| GitHub_M | 6.1medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N |
| RustSec Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Wasmtime is a runtime for WebAssembly. Prior to 24.0.7, 36.0.7, 42.0.2, and 43.0.1, Wasmtime's implementation of transcoding strings between components contains a bug where the return value of a guest component's realloc is not validated before the host attempts to write through the pointer. This enables a guest to cause the host to write arbitrary transcoded string bytes to an arbitrary location up to 4GiB away from the base of linear memory. These writes on the host could hit unmapped memory or could corrupt host data structures depending on Wasmtime's configuration. Wasmtime by default reserves 4GiB of virtual memory for a guest's linear memory meaning that this bug will by default on hosts cause the host to hit unmapped memory and abort the process due to an unhandled fault. Wasmtime can be configured, however, to reserve less memory for a guest and to remove all guard pages, so some configurations of Wasmtime may lead to corruption of data outside of a guest's linear memory, such as host data structures or other guests's linear memories. This vulnerability is fixed in 24.0.7, 36.0.7, 42.0.2, and 43.0.1.
GitHub Advisory Database
Impact
Wasmtime's implementation of transcoding strings between components contains a bug where the return value of a guest component's realloc is not validated before the host attempts to write through the pointer. This enables a guest to cause the host to write arbitrary transcoded string bytes to an arbitrary location up to 4GiB away from the base of linear memory. These writes on the host could hit unmapped memory or could corrupt host data structures depending on Wasmtime's configuration.
Wasmtime by default reserves 4GiB of virtual memory for a guest's linear memory meaning that this bug will by default on hosts cause the host to hit unmapped memory and abort the process due to an unhandled fault. Wasmtime can be configured, however, to reserve less memory for a guest and to remove all guard pages, so some configurations of Wasmtime may lead to corruption of data outside of a guest's linear memory, such as host data structures or other guests's linear memories.
Patches
Wasmtime 24.0.7, 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
There is no known workaround for this issue and affected hosts/embeddings are recommended to upgrade.
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-394w-hwhg-8vgm For more information see the GitHub-hosted security advisory.
NVD (es)
Wasmtime es un entorno de ejecución para WebAssembly. Antes de las versiones 24.0.7, 36.0.7, 42.0.2 y 43.0.1, la implementación de Wasmtime para la transcodificación de cadenas entre componentes contiene un error donde el valor de retorno de un realloc de un componente invitado no se valida antes de que el anfitrión intente escribir a través del puntero. Esto permite a un invitado hacer que el anfitrión escriba bytes de cadena transcodificados arbitrarios en una ubicación arbitraria hasta 4 GiB de distancia de la base de la memoria lineal. Estas escrituras en el anfitrión podrían acceder a memoria no mapeada o podrían corromper estructuras de datos del anfitrión, dependiendo de la configuración de Wasmtime. Wasmtime, por defecto, reserva 4 GiB de memoria virtual para la memoria lineal de un invitado, lo que significa que este error, por defecto en los anfitriones, hará que el anfitrión acceda a memoria no mapeada y aborte el proceso debido a un fallo no manejado. Sin embargo, Wasmtime puede configurarse para reservar menos memoria para un invitado y para eliminar todas las páginas de protección, por lo que algunas configuraciones de Wasmtime pueden llevar a la corrupción de datos fuera de la memoria lineal de un invitado, como estructuras de datos del anfitrión o memorias lineales de otros invitados. Esta vulnerabilidad está corregida en las versiones 24.0.7, 36.0.7, 42.0.2 y 43.0.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-35195 changed 2026-04-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-394w-hwhg-8vgm changed 2026-09-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2026-0091 changed 2026-10-12 | CC0-1.0 |
| NVD | CVE-2026-35195 changed 2026-10-26 | Public domain |