Skip to content

GHSA-rg2q-2jh9-447q Gas mispricing in cosmwasm-vm

MediumCVSS 5.3
Published
Updated
Exploit status
No public exploit known

Description

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.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
CosmWasm github.com/CosmWasm/wasmvm(Go) < 1.5.4; >= 2.0.0, < 2.0.3; >= 2.1.0, < 2.1.2 1.5.4, 2.0.3, 2.1.2 Fixed
crates.io cosmwasm-vm(crates.io) < 1.5.6; >= 0.0.0-0, < 1.5.7; >= 2.0.0, < 2.0.5; >= 2.0.0, < 2.0.6 +2 more 1.5.6, 1.5.7, 2.0.5, 2.0.6, 2.1.2, 2.1.3 Fixed

Affected products

ProductAffected versionsFixed in
crates.io cosmwasm-vm(crates.io) < 1.5.6 1.5.6
crates.io cosmwasm-vm(crates.io) >= 2.0.0, < 2.0.5 2.0.5
crates.io cosmwasm-vm(crates.io) >= 2.1.0, < 2.1.2 2.1.2
CosmWasm github.com/CosmWasm/wasmvm(Go) >= 2.1.0, < 2.1.2 2.1.2
CosmWasm github.com/CosmWasm/wasmvm(Go) >= 2.0.0, < 2.0.3 2.0.3
CosmWasm github.com/CosmWasm/wasmvm(Go) < 1.5.4 1.5.4
crates.io cosmwasm-vm(crates.io) >= 0.0.0-0, < 1.5.7 1.5.7
crates.io cosmwasm-vm(crates.io) >= 2.0.0, < 2.0.6 2.0.6
crates.io cosmwasm-vm(crates.io) >= 2.1.0, < 2.1.3 2.1.3

References