{"id":"CVE-2024-58263","aliases":["EUVD-2024-54822","GHSA-8724-5xmm-w5xq","RUSTSEC-2024-0338"],"status":"published","title":"CosmWasm affected by arithmetic overflows","description":"The cosmwasm-std crate before 2.0.2 for Rust allows integer overflows that cause incorrect contract calculations.","severity":{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00496,"percentile":0.42849,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-190"],"published":"2024-04-24T12:00:00Z","modified":"2026-06-17T08:14:44Z","fixes":[{"ecosystem":"crates.io","package":"cosmwasm-std","fixed_in":["1.4.4","1.5.4","2.0.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"cosmwasm-std","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.3.0"},{"fixed":"1.4.4"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"cosmwasm-std","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.5.0"},{"fixed":"1.5.4"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"cosmwasm-std","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.0.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cosmwasm-std","ranges":[{"type":"SEMVER","events":[{"introduced":"1.3.0"},{"fixed":"1.4.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cosmwasm-std","ranges":[{"type":"SEMVER","events":[{"introduced":"1.5.0"},{"fixed":"1.5.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cosmwasm-std","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.0.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cosmwasm-std","ranges":[{"type":"SEMVER","events":[{"introduced":"1.3.0"},{"fixed":"1.4.4"},{"introduced":"1.5.0"},{"fixed":"1.5.4"},{"introduced":"2.0.0"},{"fixed":"2.0.2"}]}]}],"products":[{"vendor":"cosmwasm","product":"cosmwasm-std"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0338.html","tags":["Exploit","Third Party Advisory","web","advisory"]},{"url":"https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-002.md","tags":["Exploit","Patch","Third Party Advisory","web","advisory"]},{"url":"https://crates.io/crates/cosmwasm-std","tags":["Product","package"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/607e7fc710fb9441096e8edbaa12879b552c8f65","tags":["web"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/a6a639e09adc355b5f889a09141649005cb08a46","tags":["web"]},{"url":"https://github.com/CosmWasm/cosmwasm/commit/eff79bcbe73b61178817aacf0a6449437adad6a9","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-58263","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-8724-5xmm-w5xq"},{"url":"https://github.com/CosmWasm/cosmwasm","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-58263","description":"The cosmwasm-std crate before 2.0.2 for Rust allows integer overflows that cause incorrect contract calculations.","status":"published","published":"2025-07-27T00:00:00Z","modified":"2025-07-28T18:55:15.988Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"cna"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T14:34:08.843708Z"}],"euvd":[{"id":"EUVD-2024-54822","description":"The cosmwasm-std crate before 2.0.2 for Rust allows integer overflows that cause incorrect contract calculations.","status":"published","published":"2025-07-27T00:00:00Z","modified":"2025-07-28T18:55:15Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"updated_at":"2026-11-02T20:32:03.359865Z"}],"ghsa":[{"id":"GHSA-8724-5xmm-w5xq","title":"CosmWasm affected by arithmetic overflows","description":"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`","status":"published","published":"2024-04-24T17:37:59Z","modified":"2025-07-28T15:52:34Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T14:38:51.864708Z"}],"nvd":[{"id":"CVE-2024-58263","description":"The cosmwasm-std crate before 2.0.2 for Rust allows integer overflows that cause incorrect contract calculations.","status":"published","published":"2025-07-27T20:15:25.23Z","modified":"2026-06-17T08:14:44.24Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T14:10:47.073504Z"}],"osv":[{"id":"GHSA-8724-5xmm-w5xq","title":"CosmWasm affected by arithmetic overflows","description":"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`","status":"published","published":"2024-04-24T17:37:59Z","modified":"2025-07-28T16:27:06.685643Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T15:46:42.077781Z"},{"id":"RUSTSEC-2024-0338","title":"Arithmetic overflows in cosmwasm-std","description":"Some mathematical operations in `cosmwasm-std` use wrapping math instead of\npanicking on overflow for very big numbers. This can lead to wrong calculations in contracts\nthat 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`","status":"published","published":"2024-04-24T12:00:00Z","modified":"2025-10-28T06:02:18Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
