CVE-2024-28123 – wasmi
Package
Manager: cargo
Name: wasmi
Vulnerable Version: >=0.15.0 <0.31.1
Severity
Level: High
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
CVSS v4.0: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
EPSS: 0.00312 pctl0.53771
Details
Wasmi Out-of-bounds Write for host to Wasm calls with more than 128 Parameters ### Summary In the WASMI Interpreter, an [Out-of-bounds Buffer Write](https://cwe.mitre.org/data/definitions/787.html) will arise arise if the host calls or resumes a Wasm function with more parameters than the default limit (128), as it will surpass the stack value. This doesn’t affect calls from Wasm to Wasm, only from host to Wasm. ### Impact After conducting an analysis of the dependent Polkadot systems of `wasmi`: [Pallet Contracts](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/contracts), [Parity Signer](https://github.com/paritytech/parity-signer), and [Smoldot](https://github.com/smol-dot/smoldot), we have found that none on those systems have been affected by the issue as they are calling host to Wasm function with a small limited amount of parameters always. ### Mitigations If you are using `wasmi` betwen version 0.15.0 and 0.31.0, please update it to the [0.31.1](https://github.com/paritytech/wasmi/releases/tag/v0.31.1) patch release that we just published. ### Workarounds Ensure no more than 128 parameters can be pass in a call from the host to a Wasm function. ### References Patch PR: <PR> ### Special thanks Special thanks to Stellar Development Foundation for reporting this security vulnerability.
Metadata
Created: 2024-03-07T17:26:27Z
Modified: 2025-06-04T00:35:09Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/03/GHSA-75jp-vq8x-h4cq/GHSA-75jp-vq8x-h4cq.json
CWE IDs: ["CWE-787"]
Alternative ID: GHSA-75jp-vq8x-h4cq
Finding: F111
Auto approve: 1