Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. wasmtime
  4. ›
  5. CVE-2024-30266

CVE-2024-30266: Wasmtime vulnerable to panic when using a dropped extenref-typed element segment

April 2, 2024 (updated May 2, 2025)

The 19.0.0 release of Wasmtime contains a regression introduced during its development which can lead to a guest WebAssembly module causing a panic in the host runtime. A valid WebAssembly module, when executed at runtime, may cause this panic. The panic in question is caused when a WebAssembly module issues a table.* instruction which uses a dropped element segment with a table that also has an externref type. This causes Wasmtime to erroneously use an empty function segment instead of an empty externref segment to perform this operation. This mismatch in types causes a panic in Wasmtime when it’s asserted that an externref table is only viewed as externrefs.

This regression was introduced during the development of the 19.0.0 release and only affects the 19.0.0 release. This panic requires the reference-types WebAssembly feature to be enabled, and it is enabled by default. Toolchains are not known to generate this pattern by default so it’s likely a module would need to be specifically crafted to trigger this panic.

A panic in a host runtime represents a possible denial-of-service in some scenarios. This panic cannot introduce memory unsafety or allow WebAssembly to break outside of its sandbox, however. There is no possible heap corruption or memory unsafety from this panic.

References

  • github.com/advisories/GHSA-75hq-h6g9-h4q5
  • github.com/bytecodealliance/wasmtime
  • github.com/bytecodealliance/wasmtime/commit/7f57d0bb0948fa56cc950278d0db230ed10e8664
  • github.com/bytecodealliance/wasmtime/issues/8281
  • github.com/bytecodealliance/wasmtime/pull/8018
  • github.com/bytecodealliance/wasmtime/pull/8283
  • github.com/bytecodealliance/wasmtime/security/advisories/GHSA-75hq-h6g9-h4q5
  • nvd.nist.gov/vuln/detail/CVE-2024-30266
  • rustsec.org/advisories/RUSTSEC-2024-0441.html

Code Behaviors & Features

Detect and mitigate CVE-2024-30266 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 19.0.0 before 19.0.1, version 19.0.0

Fixed versions

  • 19.0.1

Solution

Upgrade to version 19.0.1 or above.

Impact 3.3 LOW

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')

Source file

cargo/wasmtime/CVE-2024-30266.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:53 +0000.