Advisory

GHSA-8724-5xmm-w5xq

Also known as: CVE-2024-58263, RUSTSEC-2024-0338

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.

Affected functions:

  • Uint{256,512}::pow / Int{256,512}::pow
  • Int{256,512}::neg

Affected if overflow-checks = true is not set:

  • Uint{64,128}::pow / Int{64,128}::pow
  • Int{64,128}::neg

Severity

Low Basis: The source's own band: LOW

Dates

Published
2024-04-24 17:37 UTC
Modified
2025-07-28 16:27 UTC

Affected packages and fixes

cosmwasm-std

crates.io · All systems

Affected

  • introduced 1.3.0, fixed 1.4.4 (semver)

Fixed versions

1.4.4

Fix

  • Fixed version 1.4.4
    cargo update -p cosmwasm-std --precise 1.4.4

cosmwasm-std

crates.io · All systems

Affected

  • introduced 1.5.0, fixed 1.5.4 (semver)

Fixed versions

1.5.4

Fix

  • Fixed version 1.5.4
    cargo update -p cosmwasm-std --precise 1.5.4

cosmwasm-std

crates.io · All systems

Affected

  • introduced 2.0.0, fixed 2.0.2 (semver)

Fixed versions

2.0.2

Fix

  • Fixed version 2.0.2
    cargo update -p cosmwasm-std --precise 2.0.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences