{"id":"GHSA-8724-5xmm-w5xq","summary":"CosmWasm affected by arithmetic overflows","details":"Some mathematical operations in `cosmwasm-std` use wrapping math instead of panicking on overflow for very big numbers. This can lead to wrong calculations in contracts that use these operations.\n\nAffected functions:\n\n- `Uint{256,512}::pow` / `Int{256,512}::pow`\n- `Int{256,512}::neg`\n\nAffected if `overflow-checks = true` is not set:\n\n- `Uint{64,128}::pow` / `Int{64,128}::pow`\n- `Int{64,128}::neg`","aliases":["CVE-2024-58263","RUSTSEC-2024-0338"],"modified":"2025-07-28T16:27:06.685643Z","published":"2024-04-24T17:37:59Z","database_specific":{"cwe_ids":["CWE-190"],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2024-04-24T17:37:59Z","nvd_published_at":null},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-58263"},{"type":"WEB","url":"https://github.com/CosmWasm/cosmwasm/commit/607e7fc710fb9441096e8edbaa12879b552c8f65"},{"type":"WEB","url":"https://github.com/CosmWasm/cosmwasm/commit/a6a639e09adc355b5f889a09141649005cb08a46"},{"type":"WEB","url":"https://github.com/CosmWasm/cosmwasm/commit/eff79bcbe73b61178817aacf0a6449437adad6a9"},{"type":"WEB","url":"https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-002.md"},{"type":"PACKAGE","url":"https://github.com/CosmWasm/cosmwasm"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2024-0338.html"}],"affected":[{"package":{"name":"cosmwasm-std","ecosystem":"crates.io","purl":"pkg:cargo/cosmwasm-std"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.3.0"},{"fixed":"1.4.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/04/GHSA-8724-5xmm-w5xq/GHSA-8724-5xmm-w5xq.json"}},{"package":{"name":"cosmwasm-std","ecosystem":"crates.io","purl":"pkg:cargo/cosmwasm-std"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.5.0"},{"fixed":"1.5.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/04/GHSA-8724-5xmm-w5xq/GHSA-8724-5xmm-w5xq.json"}},{"package":{"name":"cosmwasm-std","ecosystem":"crates.io","purl":"pkg:cargo/cosmwasm-std"},"ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.0.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/04/GHSA-8724-5xmm-w5xq/GHSA-8724-5xmm-w5xq.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"}]}