# CVE-2022-23636: Invalid drop of partially-initialized instances in wasmtime

- Severity: Medium 5.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.77%, higher than 56% of CVEs (2026-12-01)
- Published: 2022-02-16T22:00:10.000Z
- Modified: 2026-10-12T18:00:04.415Z
- Also known as: GHSA-7f6x-jwh5-m9r4, GHSA-88xq-w8cq-xfg7, RUSTSEC-2022-0096, RUSTSEC-2022-0101
- Related: CVE-2022-31169
- Weaknesses: CWE-682, CWE-824
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Wasmtime is an open source runtime for WebAssembly & WASI. Prior to versions 0.34.1 and 0.33.1, there exists a bug in the pooling instance allocator in Wasmtime's runtime where a failure to instantiate an instance for a module that defines an `externref` global will result in an invalid drop of a `VMExternRef` via an uninitialized pointer. A number of conditions listed in the GitHub Security Advisory must be true in order for an instance to be vulnerable to this issue. Maintainers believe that the effective impact of this bug is relatively small because the usage of `externref` is still uncommon and without a resource limiter configured on the `Store`, which is not the default configuration, it is only possible to trigger the bug from an error returned by `mprotect` or `VirtualAlloc`. Note that on Linux with the `uffd` feature enabled, it is only possible to trigger the bug from a resource limiter as the call to `mprotect` is skipped. The bug has been fixed in 0.34.1 and 0.33.1 and users are encouraged to upgrade as soon as possible. If it is not possible to upgrade to version 0.34.1 or 0.33.1 of the `wasmtime` crate, it is recommend that support for the reference types proposal be disabled by passing `false` to `Config::wasm_reference_types`. Doing so will prevent modules that use `externref` from being loaded entirely.

(As written by CVE List.)

## Affected

- bytecodealliance wasmtime: < 0.33.0; = 0.34.0; before 0.33.1; 0.34.0
- wasmtime (crates.io): before 0.38.2; from 0.34.0 before 0.34.1; before 0.33.1; from 0.0.0-0 before 0.33.1; from 0.0.0-0 before 0.38.2
- cranelift-codegen (crates.io): before 0.85.2

## Every score

- GitHub_M: CVSS:3.1 5.1 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 5.1 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.1 High `AV:N/AC:M/Au:N/C:N/I:N/A:C`

## References

- <https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-88xq-w8cq-xfg7> (mitigation, third-party-advisory, web)
- <https://github.com/bytecodealliance/wasmtime/commit/886ecc562040bef61faf19438c22285c2d62403a> (patch, third-party-advisory, web)
- <https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-7f6x-jwh5-m9r4> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31169> (advisory)
- <https://github.com/bytecodealliance/wasmtime/commit/2ba4bce5cc719e5a74e571a534424614e62ecc41> (web)
- <https://github.com/bytecodealliance/wasmtime> (package)
- <https://rustsec.org/advisories/RUSTSEC-2022-0101.html> (advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-23636> (advisory)
- <https://rustsec.org/advisories/RUSTSEC-2022-0096.html> (advisory, web)
- <https://crates.io/crates/wasmtime> (package)

## Sources

- CVE List: [CVE-2022-23636](https://www.cve.org/CVERecord?id=CVE-2022-23636), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-7f6x-jwh5-m9r4](https://github.com/advisories/GHSA-7f6x-jwh5-m9r4), CC-BY-4.0, modified 2025-05-02
- GitHub Advisory Database: [GHSA-88xq-w8cq-xfg7](https://github.com/advisories/GHSA-88xq-w8cq-xfg7), CC-BY-4.0, modified 2025-05-02
- RustSec Advisory Database: [RUSTSEC-2022-0096](https://rustsec.org/advisories/RUSTSEC-2022-0096.html), CC0-1.0, modified 2026-10-12
- RustSec Advisory Database: [RUSTSEC-2022-0101](https://rustsec.org/advisories/RUSTSEC-2022-0101.html), CC0-1.0, modified 2026-10-12
- NVD: [CVE-2022-23636](https://nvd.nist.gov/vuln/detail/CVE-2022-23636), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-23636 · Whole record: https://cve.day/CVE-2022-23636.json · Rebuilt by cve.day 2026-11-25T22:58:09.727Z
