{"answers":{"affected":"13 open source packages ship an affected version, including github.com/CosmWasm/wasmvm/v2, github.com/CosmWasm/wasmvm and cosmwasm-vm.","exploited":"There is no known exploitation of GHSA-rg2q-2jh9-447q in the wild and no public exploit code.","fix":"Upgrade github.com/CosmWasm/wasmvm/v2 to a fixed version for your release line: 2.0.3 or 2.1.2.","what":"GHSA-rg2q-2jh9-447q is a denial of service vulnerability in github.com/CosmWasm/wasmvm, published on 8 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-rg2q-2jh9-447q and fix it if it is affected.\n\nWhat it is: GHSA-rg2q-2jh9-447q is a denial of service vulnerability in github.com/CosmWasm/wasmvm, published on 8 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-rg2q-2jh9-447q in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/CosmWasm/wasmvm/v2 (Go): affected from 2.0.0; fixed in 2.0.3\n- github.com/CosmWasm/wasmvm/v2 (Go): affected from 2.0.0; fixed in 2.0.3\n- github.com/CosmWasm/wasmvm/v2 (Go): affected from 2.1.0; fixed in 2.1.2\n- github.com/CosmWasm/wasmvm/v2 (Go): affected from 2.1.0; fixed in 2.1.2\n- github.com/CosmWasm/wasmvm (Go): affected all versions; fixed in 1.5.4\n- github.com/CosmWasm/wasmvm (Go): affected all versions; fixed in 1.5.4\n- cosmwasm-vm (crates.io): affected all versions; fixed in 1.5.6\n- cosmwasm-vm (crates.io): affected all versions; fixed in 1.5.6\n- cosmwasm-vm (crates.io): affected from 0.0.0-0; fixed in 1.5.7, 2.0.6, 2.1.3\n- cosmwasm-vm (crates.io): affected from 2.0.0; fixed in 2.0.5\n- cosmwasm-vm (crates.io): affected from 2.0.0; fixed in 2.0.5\n- cosmwasm-vm (crates.io): affected from 2.1.0; fixed in 2.1.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-rg2q-2jh9-447q/ (Markdown: https://insights.sbomify.com/GHSA-rg2q-2jh9-447q/index.md)","id":"GHSA-rg2q-2jh9-447q","markdown":"https://insights.sbomify.com/GHSA-rg2q-2jh9-447q/index.md","name":"GHSA-rg2q-2jh9-447q","record":{"aliases":["RUSTSEC-2024-0361"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"CosmWasm VM library","requires_auth":"none","summary":"A malicious smart contract can cause a blockchain denial of service by exploiting gas mispricing in the CosmWasm VM library.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"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.","ecosystems":["Go","crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Gas mispricing in cosmwasm-vm","id":"GHSA-rg2q-2jh9-447q","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"denial_of_service","year":"2024"},"n_packages":13,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["1.5.4"],"introduced":["0"],"last_affected":[],"package":"github.com/CosmWasm/wasmvm","purl":null,"source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"Go","fixed":["1.5.4"],"introduced":["0"],"last_affected":[],"package":"github.com/CosmWasm/wasmvm","purl":"pkg:golang/github.com/CosmWasm/wasmvm","source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"Go","fixed":["2.0.3"],"introduced":["2.0.0"],"last_affected":[],"package":"github.com/CosmWasm/wasmvm/v2","purl":null,"source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"Go","fixed":["2.0.3"],"introduced":["2.0.0"],"last_affected":[],"package":"github.com/CosmWasm/wasmvm/v2","purl":"pkg:golang/github.com/CosmWasm/wasmvm/v2","source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"Go","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"github.com/CosmWasm/wasmvm/v2","purl":null,"source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"Go","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"github.com/CosmWasm/wasmvm/v2","purl":"pkg:golang/github.com/CosmWasm/wasmvm/v2","source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"crates.io","fixed":["1.5.6"],"introduced":["0"],"last_affected":[],"package":"cosmwasm-vm","purl":null,"source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"crates.io","fixed":["1.5.6"],"introduced":["0"],"last_affected":[],"package":"cosmwasm-vm","purl":"pkg:cargo/cosmwasm-vm","source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"crates.io","fixed":["1.5.7","2.0.6","2.1.3"],"introduced":["0.0.0-0","2.0.0","2.1.0"],"last_affected":[],"package":"cosmwasm-vm","purl":"pkg:cargo/cosmwasm-vm","source":"RUSTSEC-2024-0361"},{"ecosystem":"crates.io","fixed":["2.0.5"],"introduced":["2.0.0"],"last_affected":[],"package":"cosmwasm-vm","purl":null,"source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"crates.io","fixed":["2.0.5"],"introduced":["2.0.0"],"last_affected":[],"package":"cosmwasm-vm","purl":"pkg:cargo/cosmwasm-vm","source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"crates.io","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"cosmwasm-vm","purl":null,"source":"GHSA-rg2q-2jh9-447q"},{"ecosystem":"crates.io","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"cosmwasm-vm","purl":"pkg:cargo/cosmwasm-vm","source":"GHSA-rg2q-2jh9-447q"}],"products":null,"published":"2024-08-08","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A malicious smart contract can cause a blockchain denial of service by exploiting gas mispricing in the CosmWasm VM library.","url":"https://insights.sbomify.com/GHSA-rg2q-2jh9-447q/"}