6.9medium
Wasmtime has a Heap OOB read in component model UTF-16 to latin1+utf16 string transcoding
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.40% (higher than 36% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hx6p-xpx3-jvvvRUSTSEC-2026-0093
Description
Wasmtime is a runtime for WebAssembly. Prior to 24.0.7, 36.0.7, 42.0.2, and 43.0.1, Wasmtime contains a vulnerability where when transcoding a UTF-16 string to the latin1+utf16 component-model encoding it would incorrectly validate the byte length of the input string when performing a bounds check. Specifically the number of code units were checked instead of the byte length, which is twice the size of the code units. This vulnerability can cause the host to read beyond the end of a WebAssembly's linear memory in an attempt to transcode nonexistent bytes. In Wasmtime's default configuration this will read unmapped memory on a guard page, terminating the process with a segfault. Wasmtime can be configured, however, without guard pages which would mean that host memory beyond the end of linear memory may be read and interpreted as UTF-16. A host segfault is a denial-of-service vulnerability in Wasmtime, and possibly being able to read beyond the end of linear memory is additionally a vulnerability. Note that reading beyond the end of linear memory requires nonstandard configuration of Wasmtime, specifically with guard pages disabled. 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, from 43.0.0 before 43.0.1 | 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.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| GitHub | 8.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| RustSec Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
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 contains a vulnerability where when transcoding a UTF-16 string to the latin1+utf16 component-model encoding it would incorrectly validate the byte length of the input string when performing a bounds check. Specifically the number of code units were checked instead of the byte length, which is twice the size of the code units. This vulnerability can cause the host to read beyond the end of a WebAssembly's linear memory in an attempt to transcode nonexistent bytes. In Wasmtime's default configuration this will read unmapped memory on a guard page, terminating the process with a segfault. Wasmtime can be configured, however, without guard pages which would mean that host memory beyond the end of linear memory may be read and interpreted as UTF-16. A host segfault is a denial-of-service vulnerability in Wasmtime, and possibly being able to read beyond the end of linear memory is additionally a vulnerability. Note that reading beyond the end of linear memory requires nonstandard configuration of Wasmtime, specifically with guard pages disabled. This vulnerability is fixed in 24.0.7, 36.0.7, 42.0.2, and 43.0.1.
GitHub Advisory Database
Summary
Wasmtime contains a vulnerability where when transcoding a UTF-16 string to the latin1+utf16 component-model encoding it would incorrectly validate the byte length of the input string when performing a bounds check. Specifically the number of code units were checked instead of the byte length, which is twice the size of the code units.
This vulnerability can cause the host to read beyond the end of a WebAssembly's linear memory in an attempt to transcode nonexistent bytes. In Wasmtime's default configuration this will read unmapped memory on a guard page, terminating the process with a segfault. Wasmtime can be configured, however, without guard pages which would mean that host memory beyond the end of linear memory may be read and interpreted as UTF-16.
A host segfault is a denial-of-service vulnerability in Wasmtime, and possibly being able to read beyond the end of linear memory is additionally a vulnerability. Note that reading beyond the end of linear memory requires nonstandard configuration of Wasmtime, specifically with guard pages disabled.
Impact
This is an out-of-bounds memory access. Any user running untrusted wasm components that use cross-component string passing (with UTF-16 source and latin1+utf16 destination encodings) is affected.
- With guard pages: Denial of service. The host process crashes with SIGBUS/SIGSEGV.
- Without guard pages: Potential information disclosure. The guest can read host memory beyond its linear memory allocation.
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 workaround for this bug. Hosts are recommended to updated to a patched version of Wasmtime.
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-hx6p-xpx3-jvvv For more information see the GitHub-hosted security advisory.
NVD (es)
Wasmtime es un entorno de ejecución para WebAssembly. Antes de 24.0.7, 36.0.7, 42.0.2 y 43.0.1, Wasmtime contiene una vulnerabilidad donde al transcodificar una cadena UTF-16 a la codificación de modelo de componente latin1+utf16, validaría incorrectamente la longitud en bytes de la cadena de entrada al realizar una comprobación de límites. Específicamente, se comprobó el número de unidades de código en lugar de la longitud en bytes, que es el doble del tamaño de las unidades de código. Esta vulnerabilidad puede hacer que el host lea más allá del final de la memoria lineal de WebAssembly en un intento de transcodificar bytes inexistentes. En la configuración predeterminada de Wasmtime, esto leerá memoria no mapeada en una página de protección, terminando el proceso con un error de segmentación (segfault). Wasmtime puede configurarse, sin embargo, sin páginas de protección, lo que significaría que la memoria del host más allá del final de la memoria lineal podría leerse e interpretarse como UTF-16. Un error de segmentación del host es una vulnerabilidad de denegación de servicio en Wasmtime, y la posibilidad de leer más allá del final de la memoria lineal es adicionalmente una vulnerabilidad. Tenga en cuenta que leer más allá del final de la memoria lineal requiere una configuración no estándar de Wasmtime, específicamente con las páginas de protección deshabilitadas. Esta vulnerabilidad está corregida en 24.0.7, 36.0.7, 42.0.2 y 43.0.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-34941 changed 2026-04-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hx6p-xpx3-jvvv changed 2026-09-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2026-0093 changed 2026-10-12 | CC0-1.0 |
| NVD | CVE-2026-34941 changed 2026-10-26 | Public domain |