CVE-2024-28123
JSON

7.3high

Wasmi Out-of-bounds Write for host to Wasm calls with more than 128 Parameters

Severity
7.3high CVSS:3.1 by GitHub_M
Exploit likelihood
0.80% (higher than 57% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-75jp-vq8x-h4cq

Description

Wasmi is an efficient and lightweight WebAssembly interpreter with a focus on constrained and embedded systems. In the WASMI Interpreter, an Out-of-bounds Buffer Write will 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. This vulnerability was patched in version 0.31.1.

Affected

Product or packageVersionsReported by
wasmi-labs wasmi>= 0.15.0, <= 0.31.0, from 0.15.0 up to 0.31.0, from 0.15.0 before 0.31.1CVE List, NVD
wasmi (crates.io)from 0.15.0 before 0.31.1GitHub Advisory Database

All scores

GitHub_M7.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
GitHub7.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-787

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Wasmi is an efficient and lightweight WebAssembly interpreter with a focus on constrained and embedded systems. In the WASMI Interpreter, an Out-of-bounds Buffer Write will 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. This vulnerability was patched in version 0.31.1.

GitHub Advisory Database
Summary

In the WASMI Interpreter, an Out-of-bounds Buffer Write 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, Parity Signer, and 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 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.

NVD (es)

Wasmi es un intérprete de WebAssembly eficiente y liviano centrado en sistemas integrados y restringidos. En el intérprete WASMI, surgirá una escritura de búfer fuera de los límites si el host llama o reanuda una función Wasm con más parámetros que el límite predeterminado (128), ya que superará el valor de la pila. Esto no afecta las llamadas de Wasm a Wasm, solo del host a Wasm. Esta vulnerabilidad fue parcheada en la versión 0.31.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-28123 changed 2024-08-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-75jp-vq8x-h4cq changed 2026-09-10CC-BY-4.0
NVDCVE-2024-28123 changed 2026-06-17Public domain