{"id":"GHSA-rg2q-2jh9-447q","aliases":["GHSA-rg2q-2jh9-447q","RUSTSEC-2024-0361"],"related":[],"kind":"vulnerability","state":"published","title":"Gas mispricing in cosmwasm-vm","summary":"**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.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"**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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"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).","format":"markdown","source":"rustsec"}],"published":"2024-08-08T12:00:00.000Z","modified":"2024-08-08T17:11:37.000Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"}],"cwes":["CWE-920"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.5.6"}],"ecosystem":"crates.io","package":"cosmwasm-vm","purl":"pkg:cargo/cosmwasm-vm","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.0.5"}],"ecosystem":"crates.io","package":"cosmwasm-vm","purl":"pkg:cargo/cosmwasm-vm","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.1.0","status":"affected","fixed":"2.1.2"}],"ecosystem":"crates.io","package":"cosmwasm-vm","purl":"pkg:cargo/cosmwasm-vm","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.1.0","status":"affected","fixed":"2.1.2"}],"ecosystem":"Go","package":"github.com/CosmWasm/wasmvm/v2","purl":"pkg:golang/github.com/CosmWasm/wasmvm/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.0.3"}],"ecosystem":"Go","package":"github.com/CosmWasm/wasmvm/v2","purl":"pkg:golang/github.com/CosmWasm/wasmvm/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.5.4"}],"ecosystem":"Go","package":"github.com/CosmWasm/wasmvm","purl":"pkg:golang/github.com/CosmWasm/wasmvm","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"1.5.7"},{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.0.6"},{"type":"semver","introduced":"2.1.0","status":"affected","fixed":"2.1.3"}],"ecosystem":"crates.io","package":"cosmwasm-vm","purl":"pkg:cargo/cosmwasm-vm","source":"rustsec"}],"references":[{"url":"https://github.com/CosmWasm/wasmvm/security/advisories/GHSA-rg2q-2jh9-447q","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/5bef1c588933bd60a04bb70099150cf84b69e144","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/9b4d6d03772b75d500a7d3c972d0d8ba6d085c06","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/c1313afeb261e17b1c8cf6a1eacee1da0dac42ae","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/CosmWasm/wasmvm","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0361.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/cosmwasm-vm","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rg2q-2jh9-447q","url":"https://github.com/advisories/GHSA-rg2q-2jh9-447q","licence":"CC-BY-4.0","modified":"2024-08-08T17:03:07.000Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2024-0361","url":"https://rustsec.org/advisories/RUSTSEC-2024-0361.html","licence":"CC0-1.0","modified":"2024-08-08T17:11:37.000Z"}],"updatedAt":"2026-11-25T22:56:43.207Z"}