CVE-2024-58263 is a low-severity (CVSS 3.7) CWE-190 vulnerability in cosmwasm-std. A fix is available for cosmwasm-std — see the affected versions and patch details below.
CosmWasm affected by arithmetic overflows
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-58263.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
cosmwasm-std🦀cosmwasm-std🦀cosmwasm-stdReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
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.
Affected functions:
Uint{256,512}::pow/Int{256,512}::powInt{256,512}::neg
Affected if overflow-checks = true is not set:
Uint{64,128}::pow/Int{64,128}::powInt{64,128}::neg
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | cosmwasm-std | ≥ 1.3.0&&< 1.4.4 | 1.4.4cargo update -p cosmwasm-std --precise 1.4.4 |
| 🦀crates.io | cosmwasm-std | ≥ 1.5.0&&< 1.5.4 | 1.5.4cargo update -p cosmwasm-std --precise 1.5.4 |
| 🦀crates.io | cosmwasm-std | ≥ 2.0.0&&< 2.0.2 | 2.0.2cargo update -p cosmwasm-std --precise 2.0.2 |
Affected Products
cosmwasm-stdcosmwasmDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cosmwasm-std, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update cosmwasm-std to 1.4.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-58263 is resolved across your whole dependency graph.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
Frequently Asked Questions
Is CVE-2024-58263 in your dependencies?
Find it across crates.io, including transitive dependencies.