Skip to content

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

High severity GitHub Reviewed Published Mar 7, 2024 in wasmi-labs/wasmi • Updated Jun 4, 2025

Package

cargo wasmi (Rust)

Affected versions

>= 0.15.0, <= 0.31.0

Patched versions

0.31.1

Description

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:

Special thanks

Special thanks to Stellar Development Foundation for reporting this security vulnerability.

References

@Robbepop Robbepop published to wasmi-labs/wasmi Mar 7, 2024
Published to the GitHub Advisory Database Mar 7, 2024
Reviewed Mar 7, 2024
Published by the National Vulnerability Database Mar 21, 2024
Last updated Jun 4, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(46th percentile)

Weaknesses

CVE ID

CVE-2024-28123

GHSA ID

GHSA-75jp-vq8x-h4cq

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.