Loading advisory.
Loading advisory.
Wasmtime has use-after-free bug after cloning `wasmtime::Linker`
In version 43.0.0 of the wasmtime crate, cloning a wasmtime::Linker is unsound and can result in use-after-free bugs.
Published 2026-04-09 12:00 UTC · Modified 2026-10-12 18:00 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| wasmtime | crates.io | >= 43.0.0, < 43.0.1 versions 43.0.0 | 43.0.1 | cargo add wasmtime@43.0.1 |
| wasmtime | PyPI | <= 43.0.0 versions 0.0.1, 0.0.2, 0.11.0, 0.12.0, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.17.0, 0.18.0, 0.18.1, 0.18.2, 0.19.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.26.0 and 67 more | No patch yet | No command until a fix exists. |
In version 43.0.0 of the wasmtime crate, cloning a wasmtime::Linker is unsound and can result in use-after-free bugs.
This bug is not controllable by guest Wasm programs. It can only be triggered by a specific sequence of embedder API calls made by the host.
The typical symptom of this use-after-free bug is a segfault. It does not enable heap corruption or data leakage.
If you are using the wasmtime CLI, rather than the embedding API, you are not affected. If you are using the embedding API but are not calling wasmtime::Linker's Clone implementation, you are not affected.
Specifically, the following steps must occur to trigger the bug:
Clone a wasmtime::Linker
Drop the original linker instance
Use the new, cloned linker instance, resulting in a use-after-free
This bug has been patched in Wasmtime version 43.0.1
Wasmtime embedders are highly encouraged to upgrade their wasmtime crate dependency.
If upgrading is not an option, or as a temporary workaround before upgrading, you can avoid this bug by not cloning wasmtime::Linker and instead creating a new, empty wasmtime::Linker and manually reregistering the host APIs from the original linker:
use wasmtime::{Linker, Result, Store};
fn clone_linker<T>(linker: &Linker<T>, store: &mut Store<T>) -> Result<Linker<T>> {
let mut cloned = Linker::new();
for (module, name, item) in linker.iter(store) {
cloned.define(module, name, item)?;
}
Ok(cloned)
}This bug was introduced during an internal refactoring that was part of our efforts to robustly handle allocation failure in Wasmtime. This refactoring introduced an string-interning pool which had an unsound TryClone[^try-clone] implementation.
[^try-clone]: The TryClone trait is our version of the Rust standard library's Clone trait that allows for returning OutOfMemory errors.
The StringPool was introduced in https://github.com/bytecodealliance/wasmtime/pull/12536, at which time the bug in TryClone for StringPool was already present, although this code path was not yet used anywhere.
wasmtime::Linker was refactored to internally use StringPool in https://github.com/bytecodealliance/wasmtime/pull/12537, at which time the buggy code path became accessible.
This bug was originally reported to the Wasmtime maintainers as https://github.com/bytecodealliance/wasmtime/pull/12906
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.001 on 2026-11-24 to 0.001 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.001 | first score | v2026.06.15 |
| 2026-11-26 | 0.001 | 0.001 | v2026.06.15 |