{"answers":{"affected":"3 open source packages ship an affected version, including github.com/cosmos/cosmos-sdk.","exploited":"There is no known exploitation of GHSA-qfc5-6r3j-jj22 in the wild and no public exploit code.","fix":"No fix has been published for GHSA-qfc5-6r3j-jj22 yet. Limit exposure of the affected software until one is available.","what":"GHSA-qfc5-6r3j-jj22 is a vulnerability in github.com/cosmos/cosmos-sdk, published on 2 Jun 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-qfc5-6r3j-jj22 and fix it if it is affected.\n\nWhat it is: GHSA-qfc5-6r3j-jj22 is a vulnerability in github.com/cosmos/cosmos-sdk, published on 2 Jun 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-qfc5-6r3j-jj22 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/cosmos/cosmos-sdk (Go): affected all versions; no fix listed\n- github.com/cosmos/cosmos-sdk (Go): affected all versions up to 0.47.2; no fix listed\n- github.com/cosmos/cosmos-sdk (Go): affected all versions up to 0.47.2; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-qfc5-6r3j-jj22/ (Markdown: https://insights.sbomify.com/GHSA-qfc5-6r3j-jj22/index.md)","id":"GHSA-qfc5-6r3j-jj22","markdown":"https://insights.sbomify.com/GHSA-qfc5-6r3j-jj22/index.md","name":"GHSA-qfc5-6r3j-jj22","record":{"aliases":["GO-2023-1821"],"analysis":{"component_type":"library","fix_type":"no_fix_stated","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Cosmos SDK library","requires_auth":"none","summary":"The x/crisis module fails to halt the blockchain when invariant violations are detected, allowing the network to continue operating in an unsafe state.","user_interaction":"not_required","vuln_class":"business_logic"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"# 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","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"Go package github.com/cosmos/cosmos-sdk module x/crisis does NOT cause chain halt","id":"GHSA-qfc5-6r3j-jj22","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"business_logic","year":"2023"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/cosmos/cosmos-sdk","purl":"pkg:golang/github.com/cosmos/cosmos-sdk","source":"GO-2023-1821"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["0.47.2"],"package":"github.com/cosmos/cosmos-sdk","purl":null,"source":"GHSA-qfc5-6r3j-jj22"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["0.47.2"],"package":"github.com/cosmos/cosmos-sdk","purl":"pkg:golang/github.com/cosmos/cosmos-sdk","source":"GHSA-qfc5-6r3j-jj22"}],"products":null,"published":"2023-06-02","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"The x/crisis module fails to halt the blockchain when invariant violations are detected, allowing the network to continue operating in an unsafe state.","url":"https://insights.sbomify.com/GHSA-qfc5-6r3j-jj22/"}