GHSA-w5w5-2882-47pc: Github.com/cosmos/cosmos sdk Github.com/cosmos/cosmos-sdk's X/crisis Does Not Charge Vulnerability
LOWGHSA-w5w5-2882-47pc is a LOW github.com/cosmos/cosmos-sdk's x/crisis does not charge vulnerability (General Security Weakness) affecting Github.com/cosmos/cosmos sdk libraries in the Go ecosystem. The issue involves github.com/cosmos/cosmos-sdk's x/crisis does not charge constantfee. Remediation is available in the latest vendor maintenance releases.
GHSA-w5w5-2882-47pc at a Glance
How to Fix GHSA-w5w5-2882-47pc
To remediate this vulnerability, upgrade all affected Github.com/cosmos/cosmos sdk 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 github.com/cosmos/cosmos-sdk to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cosmos/cosmos-sdk
How to Check if You Are Affected
To determine whether your application is affected by GHSA-w5w5-2882-47pc, inspect your project dependencies for Github.com/cosmos/cosmos sdk:
inspect dependencies for github.com/cosmos/cosmos-sdk
Analyze the terminal output to locate any version of Github.com/cosmos/cosmos sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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 General Security Weakness. In Github.com/cosmos/cosmos sdk, 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
GHSA-w5w5-2882-47pc Affected Github.com/cosmos/cosmos sdk Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cosmos/cosmos-sdk
|
Go |
≤ 0.50.0-alpha.1
|
|
References
Frequently Asked Questions
What is GHSA-w5w5-2882-47pc?
Which Github.com/cosmos/cosmos sdk versions are affected?
What version fixes GHSA-w5w5-2882-47pc?
Is github.com/cosmos/cosmos-sdk affected?
What CWE is associated with GHSA-w5w5-2882-47pc?
How can I check Go dependencies for GHSA-w5w5-2882-47pc?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w5w5-2882-47pc",
"modified" : "2023-06-30T22:13:02Z",
"published" : "2023-06-30T22:13:02Z",
"aliases" : [ ],
"summary" : "github.com/cosmos/cosmos-sdk's x/crisis does not charge ConstantFee",
"details" : "# x/crisis does not charge ConstantFee\n### Impact\nIf a transaction is sent to the `x/crisis` module to check an invariant, the ConstantFee parameter of the chain is NOT charged. All versions of the `x/crisis` module are affected on all versions of the Cosmos SDK.\n\n### Details\nThe `x/crisis` module is supposed to allow anyone to halt a chain in the event of a violated invariant by sending a `MsgVerifyInvariant` with the name of the invariant. Processing this message takes extra processing power hence a `ConstantFee` was introduced on the chain that is charged as extra from the reporter for the extra computational work. This is supposed to avert spammers on the chain making nodes do extra computations using this transaction. By not charging the `ConstantFee`, the transactions related to invariant checking are relatively cheaper compared to the computational need and other transactions.\n\nThat said, the submitter still has to pay the transaction fee to put the transaction on the network, hence using this weakness for spamming is limited by the usual mechanisms.\n\nSynthetic testing showed up to a 20% increase in CPU usage on a validator node that is spammed by hundreds of `MsgVerifyInvariant` messages which still makes this an expensive operation to carry out on a live blockchain network.\n\n### Patches\nThe `ConstantFee` charge of the `x/crisis` module will either be fixed or disabled in an upcoming regular release of the Cosmos SDK.\n\nThe `x/crisis` module was originally intended to allow chains to halt rather than continue with some unknown behavior in the case of an invariant violation (safety over liveness). However, as chains mature, and especially as the potential [cost of halting increases](https://github.com/osmosis-labs/osmosis/issues/570), chains should consider carefully what invariants they really want to halt for, and what invariants are just sort of helpful sanity checks.\n\nThe SDK team is working on new modules that allow chain developers to fine-tune the chain invariants and the necessary actions.\n\nHence, the decision was made that the `x/crisis` module will be deprecated when new modules take over its responsibilities.\n\n### Workarounds\nThere is no workaround posted. Validators are advised to leave some extra computing room on their servers for possible spamming scenarios. (This is a good measure in any case.)\n\n### References\nSDK developer epic about invariant checking: https://github.com/cosmos/cosmos-sdk/issues/15706\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cosmos/cosmos-sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.50.0-alpha.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-w5w5-2882-47pc"
}, {
"type" : "WEB",
"url" : "https://github.com/cosmos/cosmos-sdk/issues/15706"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cosmos/cosmos-sdk"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-30T22:13:02Z",
"nvd_published_at" : null
}
}