Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2021-39218

6.3 · MEDIUM
Published Sep 17, 2021 bytecodealliance CWE-125 EPSS 0.30% (22th pctl)

Overview

CVE-2021-39218 is a medium-severity vulnerability affecting bytecodealliance wasmtime. It was published on September 17, 2021 and has a CVSS 3.1 base score of 6.3 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 6.3, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical Description

Wasmtime is an open source runtime for WebAssembly & WASI. In Wasmtime from version 0.26.0 and before version 0.30.0 is affected by a memory unsoundness vulnerability. There was an invalid free and out-of-bounds read and write bug when running Wasm that uses `externref`s in Wasmtime. To trigger this bug, Wasmtime needs to be running Wasm that uses `externref`s, the host creates non-null `externrefs`, Wasmtime performs a garbage collection (GC), and there has to be a Wasm frame on the stack that is at a GC safepoint where there are no live references at this safepoint, and there is a safepoint with live references earlier in this frame's function. Under this scenario, Wasmtime would incorrectly use the GC stack map for the safepoint from earlier in the function instead of the empty safepoint. This would result in Wasmtime treating arbitrary stack slots as `externref`s that needed to be rooted for GC. At the *next* GC, it would be determined that nothing was referencing these bogus `exte

Remediation

Check the references section for vendor advisories and patches from bytecodealliance. Update wasmtime to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
bytecodealliance wasmtime >= 0.26.0, < 0.30.0 Affected

Frequently Asked Questions

What is CVE-2021-39218?

CVE-2021-39218 is a medium-severity vulnerability affecting bytecodealliance wasmtime. It was published on September 17, 2021 and has a CVSS 3.1 base score of 6.3 (MEDIUM).

How severe is CVE-2021-39218?

This vulnerability has a CVSS 3.1 base score of 6.3, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-39218?

Check the references section for vendor advisories and patches from bytecodealliance. Update wasmtime to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-39218?

CyberStrike's AI-powered security agents can automatically detect CVE-2021-39218 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.