CVE-2024-58263: Cosmwasm std CosmWasm Affected By Arithmetic Overflows Vulnerability
LOWCVE-2024-58263 is a LOW (CVSS 3.7) cosmwasm affected by arithmetic overflows vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Cosmwasm std libraries in the crates.io ecosystem. The issue involves cosmwasm affected by arithmetic overflows. Remediation is available by upgrading affected packages to version 1.4.4, 1.5.4, 2.0.2.
CVE-2024-58263 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2024-58263
To remediate this vulnerability, upgrade all affected Cosmwasm std dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade cosmwasm-std to 1.4.4
Upgrade cosmwasm-std to 1.5.4
Upgrade cosmwasm-std to 2.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for cosmwasm-std
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-58263, inspect your project dependencies for Cosmwasm std:
inspect dependencies for cosmwasm-std
Analyze the terminal output to locate any version of Cosmwasm std in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In Cosmwasm std, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-58263 Affected Cosmwasm std Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cosmwasm-std
|
crates.io |
≥ 1.3.0
< 1.4.4
|
1.4.4
|
|
cosmwasm-std
|
crates.io |
≥ 1.5.0
< 1.5.4
|
1.5.4
|
|
cosmwasm-std
|
crates.io |
≥ 2.0.0
< 2.0.2
|
2.0.2
|
References
Frequently Asked Questions
What is CVE-2024-58263?
Which Cosmwasm std versions are affected?
What version fixes CVE-2024-58263?
Is cosmwasm-std affected?
What is the CVSS score of CVE-2024-58263?
What CWE is associated with CVE-2024-58263?
How can I check crates.io dependencies for CVE-2024-58263?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8724-5xmm-w5xq",
"modified" : "2025-07-28T15:52:31Z",
"published" : "2024-04-24T17:37:59Z",
"aliases" : [ "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`",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "cosmwasm-std"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.3.0"
}, {
"fixed" : "1.4.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "cosmwasm-std"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0"
}, {
"fixed" : "1.5.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "cosmwasm-std"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.2"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-190" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-24T17:37:59Z",
"nvd_published_at" : null
}
}