{"id":"CVE-2024-58263","aliases":["RUSTSEC-2024-0338"],"url":"https://o3.security/vulnerability/CVE-2024-58263","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`","published":"2024-04-24T17:37:59Z","modified":"2025-07-28T16:27:06.685643Z","cvss":{"score":3.7,"severity":"LOW","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"cosmwasm-std","fixedVersion":"1.4.4"},{"ecosystem":"crates.io","name":"cosmwasm-std","fixedVersion":"1.5.4"},{"ecosystem":"crates.io","name":"cosmwasm-std","fixedVersion":"2.0.2"}],"fix":{"url":"https://github.com/CosmWasm/cosmwasm/commit/607e7fc710fb9441096e8edbaa12879b552c8f65","label":"CosmWasm/cosmwasm@607e7fc"},"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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2025-07-28T16:27:06.685643Z"}}