{"id":"GHSA-rg2q-2jh9-447q","aliases":["RUSTSEC-2024-0361"],"status":"published","title":"Gas mispricing in cosmwasm-vm","description":"**Component:** wasmvm\n**Criticality:** Medium ([ACMv1](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Moderate; L:Likely)\n**Patched versions:** wasmvm 1.5.4, 2.0.3, 2.1.2\n\nSome Wasm operations take significantly more gas than our benchmarks indicated. This can lead to missing the [gas target](https://github.com/CosmWasm/cosmwasm/blob/e50490c4199a234200a497219b27f071c3409f58/docs/GAS.md#cosmwasm-gas-pricing) 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.\n\nSee [CWA-2024-004](https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md) for more details.","severity":{"version":"4.0","score":5.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","level":"medium","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-920"],"published":"2024-08-08T12:00:00Z","modified":"2024-08-08T17:11:37Z","fixes":[{"ecosystem":"crates.io","package":"cosmwasm-vm","fixed_in":["1.5.6","2.0.5","2.1.2","1.5.7","2.0.6","2.1.3"],"sources":["ghsa","osv"]},{"ecosystem":"Go","package":"github.com/CosmWasm/wasmvm/v2","fixed_in":["2.1.2","2.0.3"],"sources":["ghsa","osv"]},{"ecosystem":"Go","package":"github.com/CosmWasm/wasmvm","fixed_in":["1.5.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"cosmwasm-vm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.6"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"cosmwasm-vm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.0.5"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"cosmwasm-vm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.0"},{"fixed":"2.1.2"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/CosmWasm/wasmvm/v2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.0"},{"fixed":"2.1.2"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/CosmWasm/wasmvm/v2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.0.3"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/CosmWasm/wasmvm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cosmwasm-vm","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.5.6"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cosmwasm-vm","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.0.5"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cosmwasm-vm","ranges":[{"type":"SEMVER","events":[{"introduced":"2.1.0"},{"fixed":"2.1.2"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/CosmWasm/wasmvm/v2","ranges":[{"type":"SEMVER","events":[{"introduced":"2.1.0"},{"fixed":"2.1.2"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/CosmWasm/wasmvm/v2","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.0.3"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/CosmWasm/wasmvm","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.5.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cosmwasm-vm","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"1.5.7"},{"introduced":"2.0.0"},{"fixed":"2.0.6"},{"introduced":"2.1.0"},{"fixed":"2.1.3"}]}]}],"references":[{"url":"https://github.com/CosmWasm/wasmvm/security/advisories/GHSA-rg2q-2jh9-447q","tags":["web"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/5bef1c588933bd60a04bb70099150cf84b69e144","tags":["web"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/9b4d6d03772b75d500a7d3c972d0d8ba6d085c06","tags":["web"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/c1313afeb261e17b1c8cf6a1eacee1da0dac42ae","tags":["web"]},{"url":"https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md","tags":["web","advisory"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0361.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-rg2q-2jh9-447q"},{"url":"https://github.com/CosmWasm/wasmvm","tags":["package"]},{"url":"https://crates.io/crates/cosmwasm-vm","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-rg2q-2jh9-447q","title":"Gas mispricing in cosmwasm-vm","description":"**Component:** wasmvm\n**Criticality:** Medium ([ACMv1](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Moderate; L:Likely)\n**Patched versions:** wasmvm 1.5.4, 2.0.3, 2.1.2\n\nSome Wasm operations take significantly more gas than our benchmarks indicated. This can lead to missing the [gas target](https://github.com/CosmWasm/cosmwasm/blob/e50490c4199a234200a497219b27f071c3409f58/docs/GAS.md#cosmwasm-gas-pricing) 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.\n\nSee [CWA-2024-004](https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md) for more details.\n","status":"published","published":"2024-08-08T16:30:50Z","modified":"2024-08-08T17:03:07Z","cvss":[{"version":"4.0","score":5.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","level":"medium"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-920"],"updated_at":"2026-11-02T14:37:58.427757Z"}],"osv":[{"id":"GHSA-rg2q-2jh9-447q","title":"Gas mispricing in cosmwasm-vm","description":"**Component:** wasmvm\n**Criticality:** Medium ([ACMv1](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Moderate; L:Likely)\n**Patched versions:** wasmvm 1.5.4, 2.0.3, 2.1.2\n\nSome Wasm operations take significantly more gas than our benchmarks indicated. This can lead to missing the [gas target](https://github.com/CosmWasm/cosmwasm/blob/e50490c4199a234200a497219b27f071c3409f58/docs/GAS.md#cosmwasm-gas-pricing) 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.\n\nSee [CWA-2024-004](https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md) for more details.\n","status":"published","published":"2024-08-08T16:30:50Z","modified":"2024-08-08T17:03:07Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","level":"medium"},{"version":"4.0","score":5.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-920"],"updated_at":"2026-11-02T15:46:55.877614Z"},{"id":"RUSTSEC-2024-0361","title":"CWA-2024-004: Gas mispricing in cosmwasm-vm","description":"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.\n\nFor more information, see [CWA-2024-004](https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md).","status":"published","published":"2024-08-08T12:00:00Z","modified":"2024-08-08T17:11:37Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
