Skip to main content

CVE-2024-47763 — Vulnerability in wasmtime — CVE Details

MEDIUM

wasmtime has a runtime crash when combining tail calls with trapping imports

Published October 9, 2024Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.31%). Schedule for your next planned update.

Does your project use an affected wasmtime version?

Paste your Cargo.lock to check it for CVE-2024-47763 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

Summary

Impact

Wasmtime's implementation of WebAssembly tail calls combined with stack traces can result in a runtime crash in certain WebAssembly modules. The runtime crash may be undefined behavior if Wasmtime was compiled with Rust 1.80 or prior. The runtime crash is a deterministic process abort when Wasmtime is compiled with Rust 1.81 and later.

WebAssembly tail calls are a proposal which relatively recently reached stage 4 in the standardization process. Wasmtime first enabled support for tail calls by default in Wasmtime 21.0.0, although that release contained a bug where it was only on-by-default for some configurations. In Wasmtime 22.0.0 tail calls were enabled by default for all configurations.

The specific crash happens when an exported function in a WebAssembly module (or component) performs a return_call (or return_call_indirect or return_call_ref) to an imported host function which captures a stack trace (for example, the host function raises a trap). In this situation, the stack-walking code previously assumed there was always at least one WebAssembly frame on the stack but with tail calls that is no longer true. With the tail-call proposal it's possible to have an entry trampoline appear as if it directly called the exit trampoline. This situation triggers an internal assert in the stack-walking code which raises a Rust panic!().

When Wasmtime is compiled with Rust versions 1.80 and prior this means that an extern "C" function in Rust is raising a panic!(). This is technically undefined behavior and typically manifests as a process abort when the unwinder fails to unwind Cranelift-generated frames. When Wasmtime is compiled with Rust versions 1.81 and later this panic becomes a deterministic process abort.

Overall the impact of this issue is that this is a denial-of-service vector where a malicious WebAssembly module or component can cause the host to crash. There is no other impact at this time other than availability of a service as the result of the crash is always a crash and no more.

This issue was discovered by routine fuzzing performed by the Wasmtime project via Google's OSS-Fuzz infrastructure. We have no evidence that it has ever been exploited by an attacker in the wild.

Patches

All versions of Wasmtime which have tail calls enabled by default have been patched:

  • 21.0.x - patched in 21.0.2
  • 22.0.x - patched in 22.0.1
  • 23.0.x - patched in 23.0.3
  • 24.0.x - patched in 24.0.1
  • 25.0.x - patched in 25.0.2

Wasmtime versions from 12.0.x (the first release with experimental tail call support) to 20.0.x (the last release with tail-calls off-by-default) have support for tail calls but the support is disabled by default. These versions are not affected in their default configurations, but users who explicitly enabled tail call support will need to either disable tail call support or upgrade to a patched version of Wasmtime.

Workarounds

The main workaround for this issue is to disable tail support for tail calls in Wasmtime, for example with Config::wasm_tail_call(false). Users are otherwise encouraged to upgrade to patched versions.

References

Advisory Timeline

  • First published October 9, 2024 (778 days ago).
  • Last revised September 10, 2026 — 700 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update wasmtime to 24.0.1 or later
cargo update -p wasmtime --precise 24.0.1
Cargo
Update wasmtime to 21.0.2 or later
cargo update -p wasmtime --precise 21.0.2
Cargo
Update wasmtime to 25.0.2 or later
cargo update -p wasmtime --precise 25.0.2
Cargo
Update wasmtime to 22.0.1 or later
cargo update -p wasmtime --precise 22.0.1
Cargo
Update wasmtime to 23.0.3 or later
cargo update -p wasmtime --precise 23.0.3

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (5)

Affects 1 ecosystem: crates.io (1).

PackageFixed In
wasmtime crates.io · Affected: All versions24.0.1
wasmtime crates.io · Affected: All versions21.0.2
wasmtime crates.io · Affected: All versions25.0.2
wasmtime crates.io · Affected: All versions22.0.1
wasmtime crates.io · Affected: All versions23.0.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.5 score means for each attack dimension.

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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

Frequently Asked Questions

What is CVE-2024-47763?
wasmtime has a runtime crash when combining tail calls with trapping imports. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.5/10).
How do I check if my project is affected by CVE-2024-47763?
CVE-2024-47763 affects wasmtime. It has a 0.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-47763 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.5

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.31%
EPSS percentile: 16.7

This is a below-median EPSS score — only 16.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-q8hx-mm92-4wvg
PYSEC-2024-312
RUSTSEC-2024-0440

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock