{"id":"CVE-2026-34983","aliases":["CVE-2026-34983","GHSA-hfr4-7c6c-48w2","PYSEC-2026-151","RUSTSEC-2026-0090"],"related":[],"kind":"vulnerability","state":"published","title":"Wasmtime has a use-after-free bug after cloning `wasmtime::Linker`","summary":"Wasmtime is a runtime for WebAssembly. In 43.0.0, 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. 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 vulnerability is fixed in 43.0.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Wasmtime is a runtime for WebAssembly. In 43.0.0, 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. 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 vulnerability is fixed in 43.0.1.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nIn version 43.0.0 of the `wasmtime` crate, cloning a `wasmtime::Linker` is unsound and can result in use-after-free bugs.\n\nThis 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.\n\nThe typical symptom of this use-after-free bug is a segfault. It does not enable heap corruption or data leakage.\n\nIf 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.\n\nSpecifically, the following steps must occur to trigger the bug:\n\n* Clone a `wasmtime::Linker`\n* Drop the original linker instance\n* Use the new, cloned linker instance, resulting in a use-after-free\n\n### Patches\n\nThis bug has been patched in Wasmtime version 43.0.1\n\n### Workarounds\n\nWasmtime embedders are highly encouraged to upgrade their `wasmtime` crate dependency.\n\nIf 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:\n\n```rust\nuse wasmtime::{Linker, Result, Store};\n\nfn clone_linker<T>(linker: &Linker<T>, store: &mut Store<T>) -> Result<Linker<T>> {\n    let mut cloned = Linker::new();\n    for (module, name, item) in linker.iter(store) {\n        cloned.define(module, name, item)?;\n    }\n    Ok(cloned)\n}\n```\n\n### References\n\nThis bug was introduced during an internal refactoring that was part of our efforts to [robustly handle allocation failure in Wasmtime](https://github.com/bytecodealliance/wasmtime/issues/12069). This refactoring introduced an string-interning pool which had an unsound `TryClone`[^try-clone] implementation.\n\n[^try-clone]: [The `TryClone` trait](https://github.com/bytecodealliance/wasmtime/blob/33e8b3d955697587b23cf39d87fbcbdb4d26b0c9/crates/core/src/alloc/try_clone.rs#L5-L17) is our version of the Rust standard library's `Clone` trait that allows for returning `OutOfMemory` errors.\n\n* 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.\n* `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.\n* This bug was originally reported to the Wasmtime maintainers as https://github.com/bytecodealliance/wasmtime/pull/12906","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-hfr4-7c6c-48w2\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. En la versión 43.0.0, clonar un wasmtime::Linker no es seguro y puede resultar en errores de uso después de liberación. Este error no es controlable por programas Wasm invitados. Solo puede ser activado por una secuencia específica de llamadas a la API del incrustador realizadas por el anfitrión. Específicamente, los siguientes pasos deben ocurrir para activar el error: clonar un wasmtime::Linker, descartar la instancia original del enlazador, usar la nueva instancia del enlazador clonada, lo que resulta en un uso después de liberación. Esta vulnerabilidad está corregida en la versión 43.0.1.","source":"nvd"}],"published":"2026-04-09T12:00:00.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:P/AC:H/AT:P/PR:H/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","score":1,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:P/AC:H/AT:P/PR:H/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","score":1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:P/AC:H/AT:P/PR:H/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","rating":"LOW"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:P/AC:H/AT:P/PR:H/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","score":5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","score":5,"rating":"MEDIUM"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"version":">= 43.0.0, < 43.0.1","status":"affected"}],"vendor":"bytecodealliance","product":"wasmtime","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"43.0.0","status":"affected","fixed":"43.0.1"}],"ecosystem":"crates.io","package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"43.0.0","status":"affected","fixed":"43.0.1"}],"ecosystem":"crates.io","package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"rustsec"},{"ranges":[{"status":"affected","version":"43.0.0"}],"vendor":"bytecodealliance","product":"wasmtime","cpe":"cpe:2.3:a:bytecodealliance:wasmtime:43.0.0:*:*:*:*:rust:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"43.0.0"}],"ecosystem":"PyPI","package":"wasmtime","purl":"pkg:pypi/wasmtime","source":"pysec"}],"references":[{"url":"https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-hfr4-7c6c-48w2","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34983","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/bytecodealliance/wasmtime","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/wasmtime/PYSEC-2026-151.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0090.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/wasmtime","tags":["package"],"sources":["rustsec"]},{"url":"https://github.com/bytecodealliance/wasmtime/issues/12069","tags":["report"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-13T15:28:37.718Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34983","url":"https://www.cve.org/CVERecord?id=CVE-2026-34983","licence":"CVE Terms of Use","modified":"2026-04-13T15:38:33.779Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hfr4-7c6c-48w2","url":"https://github.com/advisories/GHSA-hfr4-7c6c-48w2","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:01.950Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0090","url":"https://rustsec.org/advisories/RUSTSEC-2026-0090.html","licence":"CC0-1.0","modified":"2026-10-12T18:00:09.243Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34983","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34983","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-151","url":"https://osv.dev/vulnerability/PYSEC-2026-151","licence":"CC-BY-4.0","modified":"2026-05-21T15:00:24.330Z"}],"updatedAt":"2026-11-25T22:59:18.406Z","epss":{"score":0.00124,"percentile":0.02326,"date":"2026-12-01T12:00:22.000Z"}}