Executive brief
A vulnerability exists in pywasm3, a Python wrapper for the Wasm3 WebAssembly runtime. By processing a specially crafted WebAssembly (.wasm) file, the application may crash or allow for unauthorized code execution. This could lead to a total service outage or allow an attacker to gain control over the system running the library.
Technical details
An out-of-bounds (invalid) memory read vulnerability exists in the Wasm3 interpreter (specifically version 139076a and pywasm3 <= 0.5.0). The flaw is located in the execution engine, specifically within the 'op_Select_i32_ssr' function in 'm3_exec.h'. An attacker can exploit this by providing a malformed WebAssembly file that triggers an invalid memory dereference during validation or execution. This can result in a segmentation fault (DoS) or potentially be leveraged for arbitrary code execution. While the CVSS vector indicates local access, the vulnerability is triggered by the content of the loaded WASM module.
Affected products
- wasm3 pywasm3 <= 0.5.0
- wasm3 wasm3 139076a
Timeline
- 2024-02-19: disclosed: Issue reported on GitHub repository
- 2024-11-08: advisory: NVD published CVE-2024-27528
- 2024-11-09: advisory: GitHub Advisory published