Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

CVE-2022-24791 Explained : Impact and Mitigation

Understand the impact and technical details of CVE-2022-24791 affecting Wasmtime. Learn about the mitigation steps and immediate actions to secure your systems.

Wasmtime is a standalone JIT-style runtime for WebAssembly, using Cranelift. A use after free vulnerability in Wasmtime affects versions < 0.34.2 and >= 0.35.0, < 0.35.2. The vulnerability occurs when running Wasm that uses externrefs and enabling epoch interruption in Wasmtime.

Understanding CVE-2022-24791

This section delves into the details of the use after free vulnerability in Wasmtime.

What is CVE-2022-24791?

The CVE-2022-24791 pertains to a use after free vulnerability in Wasmtime caused by Cranelift failing to emit stack maps when there are safepoints inside cold blocks. This has the potential for harmful consequences when Wasmtime collects garbage and erroneously reclaims live references.

The Impact of CVE-2022-24791

The impact of this vulnerability is rated as HIGH with a CVSS base score of 8.1. It has a high impact on availability, confidentiality, and integrity, with no privileges required for exploitation.

Technical Details of CVE-2022-24791

This section covers the technical aspects related to the vulnerability.

Vulnerability Description

The use after free vulnerability arises due to issues with stack maps emission in Cranelift during Wasm runtime execution, leading to reclaimed references misuse.

Affected Systems and Versions

Wasmtime versions < 0.34.2 and >= 0.35.0, < 0.35.2 are affected by this vulnerability.

Exploitation Mechanism

The vulnerability can be exploited when running Wasm code that utilizes externrefs and enabling epoch interruption in Wasmtime.

Mitigation and Prevention

Here's how to mitigate and prevent the exploit of CVE-2022-24791.

Immediate Steps to Take

Users are strongly advised to upgrade to patched versions 0.34.2 and 0.35.2 to remediate the vulnerability. Alternatively, you can avoid the vulnerability by disabling the Wasm reference types proposal or epoch interruption if upgrading is not feasible at the moment.

Long-Term Security Practices

In the long term, it is crucial to stay updated on security patches and regularly update software to mitigate emerging vulnerabilities.

Patching and Updates

Regularly check for updates from Wasmtime, especially security patches, and promptly apply them to ensure systems are protected from known vulnerabilities.

Popular CVEs

CVE Id

Published Date

Is your System Free of Underlying Vulnerabilities?
Find Out Now