{"answers":{"affected":"3 open source packages ship an affected version, including github.com/CosmWasm/wasmd.","exploited":"There is no known exploitation of GHSA-vmg2-r3xv-r3xf in the wild and no public exploit code.","fix":"Upgrade github.com/CosmWasm/wasmd to 0.53.2 or later.","what":"GHSA-vmg2-r3xv-r3xf is a vulnerability in github.com/CosmWasm/wasmd, published on 10 Dec 2024."},"fix_prompt":"Check this codebase for GHSA-vmg2-r3xv-r3xf and fix it if it is affected.\n\nWhat it is: GHSA-vmg2-r3xv-r3xf is a vulnerability in github.com/CosmWasm/wasmd, published on 10 Dec 2024. \nExploitation: There is no known exploitation of GHSA-vmg2-r3xv-r3xf in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/CosmWasm/wasmd (Go): affected all versions; fixed in 0.53.2\n- github.com/CosmWasm/wasmd (Go): affected all versions; fixed in 0.53.2\n- github.com/CosmWasm/wasmd (Go): affected all versions; fixed in 0.53.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-vmg2-r3xv-r3xf/ (Markdown: https://insights.sbomify.com/GHSA-vmg2-r3xv-r3xf/index.md)","id":"GHSA-vmg2-r3xv-r3xf","markdown":"https://insights.sbomify.com/GHSA-vmg2-r3xv-r3xf/index.md","name":"GHSA-vmg2-r3xv-r3xf","record":{"aliases":["GO-2024-3319"],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"# CWA-2024-009\n\n**Severity**\n\nLow (Marginal + Likely)[^1]\n\n**Affected versions:**\n\n- wasmd \u003c 0.53.1\n\n**Patched versions:**\n\n- wasmd 0.53.2 (please note that wasmd 0.53.1 is broken and must not be used)\n\n## Description of the bug\n\n(Blank for now. We'll add more detail once chains had a chance to upgrade.)\n\n## Mitigations\n\nApart from upgrading, it is recommended to **not** open the gRPC and REST APIs of _validator_ nodes to the public internet. Use isolated and resource-constrained environments for running separate public RPC nodes instead.\nThese can then easily be thrown away and replaced with new instances in case of problems.\n\n## Applying the patch\n\n### Official Wasmd patch\n\nThe patch will be shipped in a wasmd release. You will also have to update `libwasmvm` if you build statically.\nIf you already use the latest / close to latest wasmd, you can update more or less as follows:\n\n1. Check the current wasmd version: `go list -m github.com/CosmWasm/wasmd`\n2. Bump the `github.com/CosmWasm/wasmd` dependency in your go.mod to 0.53.2 (Cosmos SDK 0.50 compatible); `go mod tidy`; commit.\n3. If you use the static libraries `libwasmvm_muslc.aarch64.a`/`libwasmvm_muslc.x86_64.a`, make sure that you use the same version as your wasmvm version.\n4. Check the updated wasmd version: `go list -m github.com/CosmWasm/wasmd` and ensure you see 0.53.2.\n5. Follow your regular practices to deploy chain upgrades.\n\nTo double check if the correct library version is loaded at runtime, use this query:\n`\u003cappd\u003e query wasm libwasmvm-version`. It must show 2.1.4.\n\nThe patch is not consensus breaking _if you are already using wasmvm 2.1.3_.\nIf you are instead using wasmvm 2.1.2, then upgrading to 2.1.4 includes the consensus breaking changes of 2.1.3.\n\n### DIY Patch\n\nIf you are unable to upgrade to the latest version, you can backport the wasmd patch to your version. The patch is available at [Wasmd 0.53.2](https://github.com/CosmWasm/wasmd/compare/v0.53.0...v0.53.2).\nHowever, if you are on an older version of wasmd, you will also be using a different version of wasmvm. We provide the required patches for wasmvm in versions 2.1.4, 2.0.5, 1.5.6.\nTo upgrade using this method:\n\n1. Check the current wasmvm version: `go list -m github.com/CosmWasm/wasmvm` and upgrade\n   to the closest patched version.\n2. Bump the github.com/CosmWasm/wasmvm dependency in your go.mod to the closest compatible patched version (either 2.1.4, 2.0.5 or 1.5.6); go mod tidy; commit.\n3. Apply the patch linked above to your version of wasmd.\n4. If you use the static libraries `libwasmvm_muslc.aarch64.a`/`libwasmvm_muslc.x86_64.a`, make sure that you use the same version as your wasmvm version.\n5. Follow your regular practices to deploy chain upgrades.\n\nTo double check if the correct library version is loaded at runtime, use this query:\n`\u003cappd\u003e query wasm libwasmvm-version`. It must show 2.1.4, 2.0.5 or 1.5.6 and must be the same as the wasmvm version in your go.sum.\n\nThe patch is not consensus breaking as long as you were using the previous patch version of wasmvm before.\n\n## Acknowledgement\n\nThis issue was found by meadow101 who reported it to the Cosmos Bug Bounty Program on HackerOne.\n\nIf you believe you have found a bug in the Interchain Stack or would like to contribute to the\nprogram by reporting a bug, please see \u003chttps://hackerone.com/cosmos\u003e.\n\n## Timeline\n\n- 2024-09-25: Confio receives a report through the Cosmos bug bounty program maintained by Amulet.\n- 2024-09-30: Confio security contributors confirm the report.\n- 2024-11-21: Confio developed the patch internally.\n- 2024-12-06: Patch release is pre-announced through notification lists.\n- 2024-12-10: Patch released.\n\n[^1]: following Amulet's Severity Classification Framework ACMv1: https://github.com/interchainio/security/blob/e0227a1fb4059144aab4f6003eeee7f09912db3a/resources/CLASSIFICATION_MATRIX.md","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Simulation of Wasmd message can cause crashing","id":"GHSA-vmg2-r3xv-r3xf","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":null,"year":"2024"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.53.2"],"introduced":["0"],"last_affected":[],"package":"github.com/CosmWasm/wasmd","purl":null,"source":"GHSA-vmg2-r3xv-r3xf"},{"ecosystem":"Go","fixed":["0.53.2"],"introduced":["0"],"last_affected":[],"package":"github.com/CosmWasm/wasmd","purl":"pkg:golang/github.com/CosmWasm/wasmd","source":"GHSA-vmg2-r3xv-r3xf"},{"ecosystem":"Go","fixed":["0.53.2"],"introduced":["0"],"last_affected":[],"package":"github.com/CosmWasm/wasmd","purl":"pkg:golang/github.com/CosmWasm/wasmd","source":"GO-2024-3319"}],"products":null,"published":"2024-12-10","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":null,"url":"https://insights.sbomify.com/GHSA-vmg2-r3xv-r3xf/"}