GHSA-rg2q-2jh9-447q: Gas mispricing in cosmwasm-vm
Component: wasmvm Criticality: Medium (ACMv1: I:Moderate; L:Likely) Patched versions: wasmvm 1.5.4, 2.0.3, 2.1.2 Some Wasm operations take significantly more gas than our benchmarks indicated. This can lead to missing the gas target we defined by a factor of ~10x. This means a malicious contract could take 10 times as much time to execute as expected, which can be used to temporarily DoS a chain.
Published Aug 8, 2024
Affected packages
cosmwasm-vm
- Ecosystem
- Rust (crates.io)
- Affected
- < 1.5.6
- Fixed in
- 1.5.6
- Check
cargo tree -i cosmwasm-vm
cosmwasm-vm
- Ecosystem
- Rust (crates.io)
- Affected
- >= 2.0.0, < 2.0.5
- Fixed in
- 2.0.5
- Check
cargo tree -i cosmwasm-vm
cosmwasm-vm
- Ecosystem
- Rust (crates.io)
- Affected
- >= 2.1.0, < 2.1.2
- Fixed in
- 2.1.2
- Check
cargo tree -i cosmwasm-vm
github.com/CosmWasm/wasmvm/v2
- Ecosystem
- Go
- Affected
- >= 2.1.0, < 2.1.2
- Fixed in
- 2.1.2
- Check
go list -m github.com/CosmWasm/wasmvm/v2
github.com/CosmWasm/wasmvm/v2
- Ecosystem
- Go
- Affected
- >= 2.0.0, < 2.0.3
- Fixed in
- 2.0.3
- Check
go list -m github.com/CosmWasm/wasmvm/v2
github.com/CosmWasm/wasmvm
- Ecosystem
- Go
- Affected
- < 1.5.4
- Fixed in
- 1.5.4
- Check
go list -m github.com/CosmWasm/wasmvm
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Component: wasmvm Criticality: Medium (ACMv1: I:Moderate; L:Likely) Patched versions: wasmvm 1.5.4, 2.0.3, 2.1.2
Some Wasm operations take significantly more gas than our benchmarks indicated. This can lead to missing the gas target we defined by a factor of ~10x. This means a malicious contract could take 10 times as much time to execute as expected, which can be used to temporarily DoS a chain.
See CWA-2024-004 for more details.
Credited to unknownfeature.
References
- https://github.com/CosmWasm/wasmvm/security/advisories/GHSA-rg2q-2jh9-447q
- https://github.com/CosmWasm/cosmwasm/commit/5bef1c588933bd60a04bb70099150cf84b69e144
- https://github.com/CosmWasm/cosmwasm/commit/9b4d6d03772b75d500a7d3c972d0d8ba6d085c06
- https://github.com/CosmWasm/cosmwasm/commit/c1313afeb261e17b1c8cf6a1eacee1da0dac42ae
- https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md
- https://rustsec.org/advisories/RUSTSEC-2024-0361.html
- https://github.com/advisories/GHSA-rg2q-2jh9-447q
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Rust (crates.io) vulnerabilities
All Rust (crates.io) entriesGHSA-23qp-3c2m-xx6w
wasmvm: Malicious smart contract can crash the chain
mediumFeb 4, 2025GHSA-mx2j-7cmv-353c
wasmvm: Malicious smart contract can slow down block production
mediumFeb 4, 2025GHSA-2q97-m5rc-p3gp
CosmWasm VM Incorrect metering
mediumDec 10, 2024GHSA-vmqh-5232-v43r
Panic in wasmvm can slow down block production
mediumDec 10, 2024GHSA-75qh-gg76-p2w4
CWA-2023-004: Excessive number of function parameters in compiled Wasm
medium5.3Aug 27, 2024
