Wasmtime up to 6.0.1/7.0.0/8.0.0 reliance on undefined, unspecified, or implementation-defined behavior
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.5 | $0-$5k | 0.00 |
Summary
A vulnerability was found in Wasmtime up to 6.0.1/7.0.0/8.0.0 and classified as problematic. Affected by this issue is some unknown functionality. Executing a manipulation can lead to reliance on undefined, unspecified, or implementation-defined behavior. This vulnerability is tracked as CVE-2023-30624. The attack can be launched remotely. No exploit exists. It is suggested to upgrade the affected component.
Details
A vulnerability classified as problematic was found in Wasmtime up to 6.0.1/7.0.0/8.0.0. This vulnerability affects an unknown code. The manipulation with an unknown input leads to a reliance on undefined, unspecified, or implementation-defined behavior vulnerability. The CWE definition for the vulnerability is CWE-758. The product uses an API function, data structure, or other entity in a way that relies on properties that are not always guaranteed to hold for that entity. As an impact it is known to affect confidentiality, integrity, and availability. CVE summarizes:
Wasmtime is a standalone runtime for WebAssembly. Prior to versions 6.0.2, 7.0.1, and 8.0.1, Wasmtime's implementation of managing per-instance state, such as tables and memories, contains LLVM-level undefined behavior. This undefined behavior was found to cause runtime-level issues when compiled with LLVM 16 which causes some writes, which are critical for correctness, to be optimized away. Vulnerable versions of Wasmtime compiled with Rust 1.70, which is currently in beta, or later are known to have incorrectly compiled functions. Versions of Wasmtime compiled with the current Rust stable release, 1.69, and prior are not known at this time to have any issues, but can theoretically exhibit potential issues. The underlying problem is that Wasmtime's runtime state for an instance involves a Rust-defined structure called `Instance` which has a trailing `VMContext` structure after it. This `VMContext` structure has a runtime-defined layout that is unique per-module. This representation cannot be expressed with safe code in Rust so `unsafe` code is required to maintain this state. The code doing this, however, has methods which take `&self` as an argument but modify data in the `VMContext` part of the allocation. This means that pointers derived from `&self` are mutated. This is typically not allowed, except in the presence of `UnsafeCell`, in Rust. When compiled to LLVM these functions have `noalias readonly` parameters which means it's UB to write through the pointers. Wasmtime's internal representation and management of `VMContext` has been updated to use `&mut self` methods where appropriate. Additionally verification tools for `unsafe` code in Rust, such as `cargo miri`, are planned to be executed on the `main` branch soon to fix any Rust-level issues that may be exploited in future compiler versions. Precomplied binaries available for Wasmtime from GitHub releases have been compiled with at most LLVM 15 so are not known to be vulnerable. As mentioned above, however, it's still recommended to update. Wasmtime version 6.0.2, 7.0.1, and 8.0.1 have been issued which contain the patch necessary to work correctly on LLVM 16 and have no known UB on LLVM 15 and earlier. If Wasmtime is compiled with Rust 1.69 and prior, which use LLVM 15, then there are no known issues. There is a theoretical possibility for undefined behavior to exploited, however, so it's recommended that users upgrade to a patched version of Wasmtime. Users using beta Rust (1.70 at this time) or nightly Rust (1.71 at this time) must update to a patched version to work correctly.
The weakness was disclosed 04/27/2023 as GHSA-ch89-5g45-qwc7. The advisory is available at github.com. This vulnerability was named CVE-2023-30624 since 04/13/2023. Successful exploitation requires user interaction by the victim. The technical details are unknown and an exploit is not available.
Upgrading to version 6.0.2, 7.0.1 or 8.0.1 eliminates this vulnerability. Applying the patch 0977952dcd9d482bff7c288868ccb52769b3a92e is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Product
Name
Version
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.5VulDB Meta Temp Score: 5.5
VulDB Base Score: 3.9
VulDB Temp Score: 3.8
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 8.8
NVD Vector: 🔍
CNA Base Score: 3.9
CNA Vector (GitHub, Inc.): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Reliance on undefined, unspecified, or implementation-defined behaviorCWE: CWE-758
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Wasmtime 6.0.2/7.0.1/8.0.1
Patch: 0977952dcd9d482bff7c288868ccb52769b3a92e
Timeline
04/13/2023 🔍04/27/2023 🔍
04/27/2023 🔍
05/21/2023 🔍
Sources
Advisory: GHSA-ch89-5g45-qwc7Status: Confirmed
CVE: CVE-2023-30624 (🔍)
GCVE (CVE): GCVE-0-2023-30624
GCVE (VulDB): GCVE-100-227602
Entry
Created: 04/27/2023 20:31Updated: 05/21/2023 10:18
Changes: 04/27/2023 20:31 (50), 05/21/2023 10:18 (11)
Complete: 🔍
Cache ID: 216::103
If you want to get best quality of vulnerability data, you may have to visit VulDB.
No comments yet. Languages: en.
Please log in to comment.