GHSA-qfc5-6r3j-jj22: Github.com/cosmos/cosmos sdk Go Package Github.com/cosmos/cosmos-sdk Module X/crisis Vulnerability
LOWGHSA-qfc5-6r3j-jj22 is a LOW go package github.com/cosmos/cosmos-sdk module x/crisis vulnerability (General Security Weakness) affecting Github.com/cosmos/cosmos sdk libraries in the Go ecosystem. The issue involves go package github.com/cosmos/cosmos-sdk module x/crisis does not cause chain halt. Remediation is available in the latest vendor maintenance releases.
GHSA-qfc5-6r3j-jj22 at a Glance
How to Fix GHSA-qfc5-6r3j-jj22
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-qfc5-6r3j-jj22, 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-qfc5-6r3j-jj22 Affected Github.com/cosmos/cosmos sdk Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cosmos/cosmos-sdk
|
Go |
≤ 0.47.2
|
|
References
Frequently Asked Questions
What is GHSA-qfc5-6r3j-jj22?
Which Github.com/cosmos/cosmos sdk versions are affected?
What version fixes GHSA-qfc5-6r3j-jj22?
Is github.com/cosmos/cosmos-sdk affected?
What CWE is associated with GHSA-qfc5-6r3j-jj22?
How can I check Go dependencies for GHSA-qfc5-6r3j-jj22?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qfc5-6r3j-jj22",
"modified" : "2023-07-05T19:52:13Z",
"published" : "2023-06-02T17:11:58Z",
"aliases" : [ ],
"summary" : "Go package github.com/cosmos/cosmos-sdk module x/crisis does NOT cause chain halt",
"details" : "# x/crisis does NOT cause chain halt\n\n### Impact\nIf an invariant check fails on a Cosmos SDK network and a transaction is sent to the `x/crisis` module to halt the chain, the chain does not halt. All versions of the `x/crisis` module is 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 is supposed to cause the nodes to panic. However, because the panic is within a transaction, it is caught by the SDK’s built-in panic-recovery machinery and just treated as a normal “invalid” transaction (ie. it returns a non-zero abci Code). Thus the `x/crisis` transactions don’t actually cause chains to halt. If there is an invariant violation, it can be confirmed with an `x/crisis` transaction, but it won’t cause any nodes to halt, they will just continue processing blocks.\n\nThat said, any node running with `start --inv-check-period X` will actually panic when it runs the periodic check (though it will still not panic just by processing an `x/crisis` transaction). Since this panic is located in EndBlock, it is not caught by the panic-recovery machinery and does actually crash the node. Presumably few if any nodes actually run with this in production because of how long the invariant checks take, and this runs all of them every `X` blocks.\n\n### Patches\nNo patches will be released.\n\nThe `x/crisis` module was originally intended to allow chains to halt rather than continue with some unknown behaviour 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, but may not be worth halting for.\n\nIn some cases, chains have already broken the invariant calculations but have dealt with the consequences off-chain or during development. Halting these chains would be counter-productive.\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 not be patched for chain halts. The module will be deprecated when new modules take over its responsibilities.\n\n### Workarounds\nIn case of a valid invariant check failure that requires a chain halt, the network validators are encouraged to coordinate off-chain for network halts. This has been an already established process for security patches.\n\n### References\nSDK developer epic about invariant checking: https://github.com/cosmos/cosmos-sdk/issues/15706\nPublic report: https://github.com/cosmos/cosmos-sdk/issues/15325",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cosmos/cosmos-sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.47.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-qfc5-6r3j-jj22"
}, {
"type" : "WEB",
"url" : "https://github.com/cosmos/cosmos-sdk/issues/15325"
}, {
"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-02T17:11:58Z",
"nvd_published_at" : null
}
}