{"id":"CVE-2025-64345","aliases":["CVE-2025-64345","GHSA-hc7m-r6v8-hg9q","RUSTSEC-2025-0118"],"related":[],"kind":"vulnerability","state":"published","title":"Wasmtime provides unsound API access to a WebAssembly shared linear memory","summary":"Wasmtime is a runtime for WebAssembly. Prior to version 38.0.4, 37.0.3, 36.0.3, and 24.0.5, Wasmtime's Rust embedder API contains an unsound interaction where a WebAssembly shared linear memory could be viewed as a type which provides safe access to the host (Rust) to the contents of the linear memory. This is not sound for shared linear memories, which could be modified in parallel, and this could lead to a data race in the host. Patch releases have been issued for all supported versions of Wasmtime, notably: 24.0.5, 36.0.3, 37.0.3, and 38.0.4. These releases reject creation of shared memories via `Memory::new` and shared memories are now excluded from core dumps. As a workaround, eembeddings affected by this issue should use `SharedMemory::new` instead of `Memory::new` to create shared memories. Affected embeddings should also disable core dumps if they are unable to upgrade. Note that core dumps are disabled by default but the wasm threads proposal (and shared memory) is enabled by default.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Wasmtime is a runtime for WebAssembly. Prior to version 38.0.4, 37.0.3, 36.0.3, and 24.0.5, Wasmtime's Rust embedder API contains an unsound interaction where a WebAssembly shared linear memory could be viewed as a type which provides safe access to the host (Rust) to the contents of the linear memory. This is not sound for shared linear memories, which could be modified in parallel, and this could lead to a data race in the host. Patch releases have been issued for all supported versions of Wasmtime, notably: 24.0.5, 36.0.3, 37.0.3, and 38.0.4. These releases reject creation of shared memories via `Memory::new` and shared memories are now excluded from core dumps. As a workaround, eembeddings affected by this issue should use `SharedMemory::new` instead of `Memory::new` to create shared memories. Affected embeddings should also disable core dumps if they are unable to upgrade. Note that core dumps are disabled by default but the wasm threads proposal (and shared memory) is enabled by default.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWasmtime's Rust embedder API contains an unsound interaction where a WebAssembly shared linear memory could be viewed as a type which provides safe access to the host (Rust) to the contents of the linear memory. This is not sound for shared linear memories, which could be modified in parallel, and this could lead to a data race in the host.\n\nWasmtime has a `wasmtime::Memory` type which represents linear memories in a WebAssembly module. Wasmtime also has `wasmtime::SharedMemory`, however, which represents shared linear memories introduced in the WebAssembly `threads` proposal. The API of `SharedMemory` does not provide accessors which return `&[u8]` in Rust, for example, as that's not a sound type signature when other threads could be modifying memory. The `wasmtime::Memory` type, however, does provide this API as it's intended to be used with non-shared memories where static knowledge is available that no concurrent or parallel reads or writes are happening. This means that it's not sound to represent a shared linear memory with `wasmtime::Memory` and it must instead be represented with `wasmtime::SharedMemory`.\n\nThere were two different, erroneous, methods of creating a `wasmtime::Memory` which represents a shared memory however:\n\n1. The [`wasmtime::Memory::new` constructor](https://docs.rs/wasmtime/latest/wasmtime/struct.Memory.html#method.new) takes a `MemoryType` which could be `shared`. This function did not properly reject shared memory types and require usage of [`SharedMemory::new`](https://docs.rs/wasmtime/latest/wasmtime/struct.SharedMemory.html#method.new) instead.\n2. Capturing a core dump with WebAssembly would expose all linear memories a `wasmtime::Memory`. This means that a core dump would perform an unsynchronized read of shared linear memory, possibly leading to data races.\n\nThis is a bug in Wasmtime's safe Rust API. It should not be possible to cause unsoundness with Wasmtime's embedding API if `unsafe` is not used. Embeddings which do not use the wasm threads proposal nor created shared memories nor actually share shared memories across threads are unaffected. Only if shared memories are created across threads might an embedding be affected.\n\n### Patches\n\nPatch releases have been issued for [all supported versions of Wasmtime](https://docs.wasmtime.dev/stability-release.html), notably: 24.0.5, 36.0.3, 37.0.3, and 38.0.4. These releases reject creation of shared memories via `Memory::new` and shared memories are now excluded from core dumps. \n\n### Workarounds\n\nEmbeddings affected by this issue should use `SharedMemory::new` instead of `Memory::new` to create shared memories. Affected embeddings should also disable core dumps if they are unable to upgrade. Note that core dumps are disabled by default but the wasm threads proposal (and shared memory) is enabled by default. It's recommended to upgrade to a patched version of Wasmtime, however.","format":"markdown","source":"ghsa"},{"lang":"en","text":"This is an entry in the RustSec database for the Wasmtime security advisory\nlocated at\nhttps://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-hc7m-r6v8-hg9q\nFor more information see the GitHub-hosted security advisory.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Wasmtime es un entorno de ejecución para WebAssembly. Versiones anteriores a la 38.0.4, 37.0.3, 36.0.3 y 24.0.5, la API del incrustador Rust de Wasmtime contiene una interacción insegura donde una memoria lineal compartida de WebAssembly podría ser vista como un tipo que proporciona acceso seguro al host (Rust) a los contenidos de la memoria lineal. Esto no es seguro para memorias lineales compartidas, las cuales podrían ser modificadas en paralelo, y esto podría llevar a una condición de carrera de datos en el host. Se han emitido lanzamientos de parches para todas las versiones compatibles de Wasmtime, en particular: 24.0.5, 36.0.3, 37.0.3 y 38.0.4. Estas versiones rechazan la creación de memorias compartidas a través de 'Memory::new' y las memorias compartidas ahora están excluidas de los volcados de memoria. Como solución alternativa, las incrustaciones afectadas por este problema deberían usar 'SharedMemory::new' en lugar de 'Memory::new' para crear memorias compartidas. Las incrustaciones afectadas también deberían deshabilitar los volcados de memoria si no pueden actualizar. Tenga en cuenta que los volcados de memoria están deshabilitados por defecto, pero la propuesta de hilos wasm (y la memoria compartida) está habilitada por defecto.","source":"nvd"}],"published":"2025-11-11T12:00:00.000Z","modified":"2026-10-18T20:10:00.110Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N","score":1.8,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N","score":1.8,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N","score":1.8,"rating":"LOW"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N","score":1.8,"rating":"LOW"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"version":">= 38.0.1, < 38.0.4","status":"affected"},{"version":">= 37.0.0, < 37.0.3","status":"affected"},{"version":">= 26.0.0, < 36.0.3","status":"affected"},{"version":"< 24.0.5","status":"affected"}],"vendor":"bytecodealliance","product":"wasmtime","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"38.0.0","status":"affected","fixed":"38.0.4"}],"ecosystem":"crates.io","package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"37.0.0","status":"affected","fixed":"37.0.3"}],"ecosystem":"crates.io","package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"26.0.0","status":"affected","fixed":"36.0.3"}],"ecosystem":"crates.io","package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"24.0.5"}],"ecosystem":"crates.io","package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"24.0.5"},{"type":"semver","introduced":"25.0.0","status":"affected","fixed":"36.0.3"},{"type":"semver","introduced":"37.0.0","status":"affected","fixed":"37.0.3"},{"type":"semver","introduced":"38.0.0","status":"affected","fixed":"38.0.4"}],"ecosystem":"crates.io","package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"rustsec"}],"references":[{"url":"https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-hc7m-r6v8-hg9q","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/bytecodealliance/wasmtime/commit/9ebb6934f00d58b92fb68ed0e0b16c0ae828ca10","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://docs.rs/wasmtime/latest/wasmtime/struct.Memory.html#method.new","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://docs.rs/wasmtime/latest/wasmtime/struct.SharedMemory.html#method.new","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://docs.wasmtime.dev/stability-release.html","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/bytecodealliance/wasmtime/releases/tag/v38.0.4","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64345","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/bytecodealliance/wasmtime","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0118.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/wasmtime","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-11-12T21:40:25.293Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-64345","url":"https://www.cve.org/CVERecord?id=CVE-2025-64345","licence":"CVE Terms of Use","modified":"2025-11-12T21:40:37.909Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hc7m-r6v8-hg9q","url":"https://github.com/advisories/GHSA-hc7m-r6v8-hg9q","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:31.065Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2025-0118","url":"https://rustsec.org/advisories/RUSTSEC-2025-0118.html","licence":"CC0-1.0","modified":"2026-10-12T18:00:07.413Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-64345","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64345","licence":"Public domain","modified":"2026-10-18T20:10:00.110Z"}],"updatedAt":"2026-11-25T22:59:07.603Z","epss":{"score":0.00116,"percentile":0.01785,"date":"2026-12-01T12:00:22.000Z"}}