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

- Severity: Medium (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-08-08T12:00:00.000Z
- Modified: 2024-08-08T17:11:37.000Z
- Also known as: RUSTSEC-2024-0361
- Weaknesses: CWE-920

## Description

**Component:** wasmvm
**Criticality:** Medium ([ACMv1](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): 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](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.

See [CWA-2024-004](https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md) for more details.

(As written by GitHub Advisory Database.)

## Affected

- cosmwasm-vm (crates.io): before 1.5.6; from 2.0.0 before 2.0.5; from 2.1.0 before 2.1.2; from 0.0.0-0 before 1.5.7; from 2.0.0 before 2.0.6; from 2.1.0 before 2.1.3
- github.com/CosmWasm/wasmvm/v2 (Go): from 2.1.0 before 2.1.2; from 2.0.0 before 2.0.3
- github.com/CosmWasm/wasmvm (Go): before 1.5.4

## Every score

- GitHub: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:4.0 Medium `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`

## References

- <https://github.com/CosmWasm/wasmvm/security/advisories/GHSA-rg2q-2jh9-447q> (web)
- <https://github.com/CosmWasm/cosmwasm/commit/5bef1c588933bd60a04bb70099150cf84b69e144> (web)
- <https://github.com/CosmWasm/cosmwasm/commit/9b4d6d03772b75d500a7d3c972d0d8ba6d085c06> (web)
- <https://github.com/CosmWasm/cosmwasm/commit/c1313afeb261e17b1c8cf6a1eacee1da0dac42ae> (web)
- <https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md> (advisory, web)
- <https://github.com/CosmWasm/wasmvm> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0361.html> (advisory, web)
- <https://crates.io/crates/cosmwasm-vm> (package)

## Sources

- GitHub Advisory Database: [GHSA-rg2q-2jh9-447q](https://github.com/advisories/GHSA-rg2q-2jh9-447q), CC-BY-4.0, modified 2024-08-08
- RustSec Advisory Database: [RUSTSEC-2024-0361](https://rustsec.org/advisories/RUSTSEC-2024-0361.html), CC0-1.0, modified 2024-08-08

---

Page: https://cve.day/GHSA-rg2q-2jh9-447q · Whole record: https://cve.day/GHSA-rg2q-2jh9-447q.json · Rebuilt by cve.day 2026-11-25T22:56:43.207Z
