CVE-2025-64345: Wasmtime Wasmtime Provides Unsound API Access Vulnerability
LOWCVE-2025-64345 is a LOW (CVSS 1.8) wasmtime provides unsound api access vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Wasmtime libraries in the crates.io ecosystem. The issue involves wasmtime provides unsound api access to a webassembly shared linear memory. Remediation is available by upgrading affected packages to version 38.0.4, 37.0.3, 36.0.3, 24.0.5.
CVE-2025-64345 at a Glance
Security Impact
CVSS: 1.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N).
How to Fix CVE-2025-64345
To remediate this vulnerability, upgrade all affected Wasmtime dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade wasmtime to 38.0.4
Upgrade wasmtime to 37.0.3
Upgrade wasmtime to 36.0.3
Upgrade wasmtime to 24.0.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for wasmtime
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-64345, inspect your project dependencies for Wasmtime:
inspect dependencies for wasmtime
Analyze the terminal output to locate any version of Wasmtime in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 38.0.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Wasmtime, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-64345 Affected Wasmtime Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
wasmtime
|
crates.io |
≥ 38.0.0
< 38.0.4
|
38.0.4
|
|
wasmtime
|
crates.io |
≥ 37.0.0
< 37.0.3
|
37.0.3
|
|
wasmtime
|
crates.io |
≥ 26.0.0
< 36.0.3
|
36.0.3
|
|
wasmtime
|
crates.io |
< 24.0.5
|
24.0.5
|
References
Frequently Asked Questions
What is CVE-2025-64345?
Which Wasmtime versions are affected?
What version fixes CVE-2025-64345?
Is wasmtime affected?
What is the CVSS score of CVE-2025-64345?
What CWE is associated with CVE-2025-64345?
How can I check crates.io dependencies for CVE-2025-64345?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hc7m-r6v8-hg9q",
"modified" : "2025-11-13T22:02:14Z",
"published" : "2025-11-12T21:36:29Z",
"aliases" : [ "CVE-2025-64345" ],
"summary" : "Wasmtime provides unsound API access to a WebAssembly shared linear memory",
"details" : "### 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "38.0.0"
}, {
"fixed" : "38.0.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "37.0.0"
}, {
"fixed" : "37.0.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "26.0.0"
}, {
"fixed" : "36.0.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "24.0.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-hc7m-r6v8-hg9q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64345"
}, {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/commit/9ebb6934f00d58b92fb68ed0e0b16c0ae828ca10"
}, {
"type" : "WEB",
"url" : "https://docs.rs/wasmtime/latest/wasmtime/struct.Memory.html#method.new"
}, {
"type" : "WEB",
"url" : "https://docs.rs/wasmtime/latest/wasmtime/struct.SharedMemory.html#method.new"
}, {
"type" : "WEB",
"url" : "https://docs.wasmtime.dev/stability-release.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/bytecodealliance/wasmtime"
}, {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/releases/tag/v38.0.4"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2025-0118.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-362" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-11-12T21:36:29Z",
"nvd_published_at" : "2025-11-12T22:15:49Z"
}
}