{"answers":{"affected":"6 open source packages ship an affected version, including wasmtime. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-39392 in the wild and no public exploit code.","fix":"Upgrade wasmtime to a fixed version for your release line: 1.0.2 or 2.0.2.","what":"CVE-2022-39392 is a medium-severity memory corruption vulnerability in bytecodealliance wasmtime, published on 10 Nov 2022. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-39392 and fix it if it is affected.\n\nWhat it is: CVE-2022-39392 is a medium-severity memory corruption vulnerability in bytecodealliance wasmtime, published on 10 Nov 2022. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-39392 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- wasmtime (crates.io): affected all versions; fixed in 1.0.2\n- wasmtime (crates.io): affected all versions; fixed in 1.0.2\n- wasmtime (crates.io): affected from 0.0.0-0; fixed in 1.0.2, 2.0.2\n- wasmtime (crates.io): affected from 0.0.0-0; fixed in 1.0.2, 2.0.2\n- wasmtime (crates.io): affected from 2.0.0; fixed in 2.0.2\n- wasmtime (crates.io): affected from 2.0.0; fixed in 2.0.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-39392/ (Markdown: https://insights.sbomify.com/CVE-2022-39392/index.md)","id":"CVE-2022-39392","markdown":"https://insights.sbomify.com/CVE-2022-39392/index.md","name":"CVE-2022-39392","record":{"aliases":["GHSA-44mr-8vmm-wjhg","RUSTSEC-2022-0076","RUSTSEC-2022-0102","UBUNTU-CVE-2022-39392"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"WebAssembly runtime","requires_auth":"high_privilege","summary":"Attacker can achieve out-of-bounds read/write and potential code execution in Wasmtime when configured with zero memory pages.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"wasmtime","vendor":"bytecodealliance"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"},{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"description":"Wasmtime is a standalone runtime for WebAssembly. Prior to version 2.0.2, there is a bug in Wasmtime's implementation of its pooling instance allocator when the allocator is configured to give WebAssembly instances a maximum of zero pages of memory. In this configuration, the virtual memory mapping for WebAssembly memories did not meet the compiler-required configuration requirements for safely executing WebAssembly modules. Wasmtime's default settings require virtual memory page faults to indicate that wasm reads/writes are out-of-bounds, but the pooling allocator's configuration would not create an appropriate virtual memory mapping for this meaning out of bounds reads/writes can successfully read/write memory unrelated to the wasm sandbox within range of the base address of the memory mapping created by the pooling allocator. This bug is not applicable with the default settings of the `wasmtime` crate. This bug can only be triggered by setting `InstanceLimits::memory_pages` to zero. This is expected to be a very rare configuration since this means that wasm modules cannot allocate any pages of linear memory. All wasm modules produced by all current toolchains are highly likely to use linear memory, so it's expected to be unlikely that this configuration is set to zero by any production embedding of Wasmtime. This bug has been patched and users should upgrade to Wasmtime 2.0.2. This bug can be worked around by increasing the `memory_pages` allotment when configuring the pooling allocator to a value greater than zero. If an embedding wishes to still prevent memory from actually being used then the `Store::limiter` method can be used to dynamically disallow growth of memory beyond 0 bytes large. Note that the default `memory_pages` value is greater than zero.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Wasmtime vulnerable to out of bounds read/write with zero-memory-pages configuration","id":"CVE-2022-39392","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2022"},"n_packages":6,"n_references":2,"next":{"headline":"Wasmtime vulnerable to data leakage between instances in the pooling allocator","id":"CVE-2022-39393"},"packages":[{"ecosystem":"crates.io","fixed":["1.0.2"],"introduced":["0"],"last_affected":[],"package":"wasmtime","purl":null,"source":"GHSA-44mr-8vmm-wjhg"},{"ecosystem":"crates.io","fixed":["1.0.2"],"introduced":["0"],"last_affected":[],"package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"GHSA-44mr-8vmm-wjhg"},{"ecosystem":"crates.io","fixed":["1.0.2","2.0.2"],"introduced":["0.0.0-0","2.0.0"],"last_affected":[],"package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"RUSTSEC-2022-0076"},{"ecosystem":"crates.io","fixed":["1.0.2","2.0.2"],"introduced":["0.0.0-0","2.0.0"],"last_affected":[],"package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"RUSTSEC-2022-0102"},{"ecosystem":"crates.io","fixed":["2.0.2"],"introduced":["2.0.0"],"last_affected":[],"package":"wasmtime","purl":null,"source":"GHSA-44mr-8vmm-wjhg"},{"ecosystem":"crates.io","fixed":["2.0.2"],"introduced":["2.0.0"],"last_affected":[],"package":"wasmtime","purl":"pkg:cargo/wasmtime","source":"GHSA-44mr-8vmm-wjhg"}],"prev":{"headline":"Witness Block Parsing DoS Vulnerability in lnd","id":"CVE-2022-39389"},"products":["wasmtime"],"published":"2022-11-10","related":[{"cvss_score":9,"headline":"Wasmtime miscompiled guest heap access enables sandbox escape on aarch64 Cranelift","id":"CVE-2026-34971","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":9,"headline":"Wasmtime with Winch compiler backend on aarch64 may allow a sandbox-escaping memory access","id":"CVE-2026-34987","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":8.6,"headline":"Wasmtime vulnerable to data leakage between instances in the pooling allocator","id":"CVE-2022-39393","kev_date_added":null,"published":"2022-11-10"},{"cvss_score":8.1,"headline":"Use after free in Wasmtime","id":"CVE-2022-24791","kev_date_added":null,"published":"2022-03-31"},{"cvss_score":7.5,"headline":"Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction","id":"CVE-2026-47261","kev_date_added":null,"published":"2026-06-15"},{"cvss_score":6.9,"headline":"Wasmtime has a Heap OOB read in component model UTF-16 to latin1+utf16 string transcoding","id":"CVE-2026-34941","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":6.9,"headline":"Wasmtime is vulnerable to panic when dropping a `[Typed]Func::call_async` future","id":"CVE-2026-27195","kev_date_added":null,"published":"2026-02-24"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["bytecodealliance"]},"summary":"Attacker can achieve out-of-bounds read/write and potential code execution in Wasmtime when configured with zero memory pages.","url":"https://insights.sbomify.com/CVE-2022-39392/"}