Reachable Assertion Affecting wasmtime package, versions >=12.0.0 <21.0.2>=21.0.0 <21.0.2>=22.0.0 <22.0.1>=23.0.0 <23.0.3>=24.0.0 <24.0.1>=25.0.0 <25.0.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-WASMTIME-8179275
  • published10 Oct 2024
  • disclosed9 Oct 2024
  • creditUnknown

Introduced: 9 Oct 2024

CVE-2024-47763  (opens in a new tab)
CWE-617  (opens in a new tab)

How to fix?

Upgrade wasmtime to version 21.0.2, 21.0.2, 22.0.1, 23.0.3, 24.0.1, 25.0.2 or higher.

Overview

Affected versions of this package are vulnerable to Reachable Assertion when an exported function in a WebAssembly module performs a return_call, return_call_indirect, or return_call_ref to an imported host function that captures a stack trace, it can trigger a runtime crash. This crash occurs because the stack-walking code incorrectly assumes there is always at least one WebAssembly frame on the stack, which is not the case with tail calls. This can lead to a panic!() in Rust, resulting in undefined behavior or a deterministic process abort depending on the Rust version used to compile Wasmtime.

Note: This vulnerability is only exploitable if tail call support is enabled in Wasmtime.

Workaround

To mitigate this issue, disable tail call support in Wasmtime configurations using Config::wasm_tail_call(false).",

CVSS Scores

version 4.0
version 3.1