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-39216

6.3 · MEDIUM
Published Sep 17, 2021 bytecodealliance CWE-416 EPSS 0.31% (23th pctl)

Overview

CVE-2021-39216 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.19.0 and before version 0.30.0 there was a use-after-free bug when passing `externref`s from the host to guest Wasm content. To trigger the bug, you have to explicitly pass multiple `externref`s from the host to a Wasm instance at the same time, either by passing multiple `externref`s as arguments from host code to a Wasm function, or returning multiple `externref`s to Wasm from a multi-value return function defined in the host. If you do not have host code that matches one of these shapes, then you are not impacted. If Wasmtime's `VMExternRefActivationsTable` became filled to capacity after passing the first `externref` in, then passing in the second `externref` could trigger a garbage collection. However the first `externref` is not rooted until we pass control to Wasm, and therefore could be reclaimed by the collector if nothing else was holding a reference to it or otherwise keeping it alive. Then

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.19.0, < 0.30.0 Affected

Frequently Asked Questions

What is CVE-2021-39216?

CVE-2021-39216 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-39216?

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-39216?

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-39216?

CyberStrike's AI-powered security agents can automatically detect CVE-2021-39216 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.