# CVE-2021-39218: RUSTSEC-2021-0110 - Multiple Vulnerabilities in Wasmtime

Source: https://junglewise.ai/threats/cve-2021-39216-out-of-bounds-read-write-and-invalid-free-with-externref-s-and-gc  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-09-17  
License: CC BY 4.0 with a link back

CVE-2021-39218 · Severity: low · CVSS 3.1 · Published 2021-09-17

Multiple Vulnerabilities in Wasmtime

Technologies: [wasmtime (crates.io)](https://junglewise.ai/threats/technologies/wasmtime), [wasmtime (PyPI)](https://junglewise.ai/threats/technologies/pypi-wasmtime). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2021-39218 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-39218 being exploited in the wild.

**How severe is CVE-2021-39218?** Low severity, with a CVSS score of 3.1, published 17 September 2021.

**Which products and versions are affected?** wasmtime (crates.io) SEMVER:introduced=0.0.0-0,fixed=0.30.0; wasmtime (PyPI) GIT:introduced=0,fixed=101998733b74624cbd348a2366d05760b40181f3|ECOSYSTEM:introduced=0,fixed=0.30.0, GIT:introduced=0,fixed=398a73f0dd862dbe703212ebae8e34036a18c11c|ECOSYSTEM:introduced=0,fixed=0.30.0, GIT:introduced=0,fixed=b39f087414f27ae40c44449ed5d1154e03449bff|ECOSYSTEM:introduced=0,fixed=0.30.0.

**Is there a fix for CVE-2021-39218?** Yes. wasmtime (crates.io): upgrade to 0.30.0 or later; wasmtime (PyPI): upgrade to 0.30.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-39218?** Check whether you run wasmtime (crates.io) or wasmtime (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- wasmtime (crates.io): upgrade to 0.30.0 or later

  ```sh
  cargo update -p wasmtime
  ```

- wasmtime (PyPI): upgrade to 0.30.0 or later

  ```sh
  pip install "wasmtime>=0.30.0"
  ```


## Affected products

- wasmtime (crates.io) SEMVER:introduced=0.0.0-0,fixed=0.30.0
- wasmtime (PyPI) GIT:introduced=0,fixed=101998733b74624cbd348a2366d05760b40181f3|ECOSYSTEM:introduced=0,fixed=0.30.0, GIT:introduced=0,fixed=398a73f0dd862dbe703212ebae8e34036a18c11c|ECOSYSTEM:introduced=0,fixed=0.30.0, GIT:introduced=0,fixed=b39f087414f27ae40c44449ed5d1154e03449bff|ECOSYSTEM:introduced=0,fixed=0.30.0

## Identifiers

- CVE-2021-39218
- CVE-2021-39216
- CVE-2021-39219
- GHSA-4873-36h9-wv49
- GHSA-q879-9g95-56mx
- GHSA-v4cp-h94r-m7xf
- PYSEC-2021-320
- PYSEC-2021-321
- PYSEC-2021-322
- RUSTSEC-2021-0110

## Related threats

- [RUSTSEC-2026-0422 - Typed functions with `i31` or `nullref` arguments may panic due to insufficient type-check](https://junglewise.ai/threats/rustsec-2026-0422-typed-functions-with-i31-or-nullref-arguments-may-0545dc2b)
- [Wasmtime type confusion with host-created struct types](https://junglewise.ai/threats/rustsec-2026-0423-cross-engine-type-confusion-with-host-created-struct-89fe3f0e)
- [Wasmtime unchecked memory usage in borrowed resource transfer](https://junglewise.ai/threats/rustsec-2026-0424-unchecked-memory-usage-in-transferring-borrowed-b297503c)
- [Wasmtime Cranelift aarch64 br_table sandbox escape](https://junglewise.ai/threats/cve-2026-115893-wasmtime-is-a-runtime-for-webassembly-prior-to-36-0-19-48-0-7)
- [Wasmtime component-model type-check bypass in stream/future lowering](https://junglewise.ai/threats/cve-2026-115892-wasmtime-is-a-runtime-for-webassembly-from-46-0-0-until-48-0-7)
