{"answers":{"affected":"3 open source packages ship an affected version, including github.com/cosmos/cosmos-sdk.","exploited":"There is no known exploitation of GHSA-w5w5-2882-47pc in the wild and no public exploit code.","fix":"No fix has been published for GHSA-w5w5-2882-47pc yet. Limit exposure of the affected software until one is available.","what":"GHSA-w5w5-2882-47pc is a denial of service vulnerability in github.com/cosmos/cosmos-sdk, published on 30 Jun 2023. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-w5w5-2882-47pc and fix it if it is affected.\n\nWhat it is: GHSA-w5w5-2882-47pc is a denial of service vulnerability in github.com/cosmos/cosmos-sdk, published on 30 Jun 2023. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-w5w5-2882-47pc 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.50.0-alpha.1; no fix listed\n- github.com/cosmos/cosmos-sdk (Go): affected all versions up to 0.50.0-alpha.1; 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-w5w5-2882-47pc/ (Markdown: https://insights.sbomify.com/GHSA-w5w5-2882-47pc/index.md)","id":"GHSA-w5w5-2882-47pc","markdown":"https://insights.sbomify.com/GHSA-w5w5-2882-47pc/index.md","name":"GHSA-w5w5-2882-47pc","record":{"aliases":["GO-2023-1881"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Cosmos SDK blockchain library","requires_auth":"low_privilege","summary":"Attackers can spam invariant checks without paying the required constant fee, causing excessive CPU usage and potential denial of service on validator nodes.","user_interaction":"not_required","vuln_class":"denial_of_service"},"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 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","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":"github.com/cosmos/cosmos-sdk's x/crisis does not charge ConstantFee","id":"GHSA-w5w5-2882-47pc","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"denial_of_service","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-1881"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["0.50.0-alpha.1"],"package":"github.com/cosmos/cosmos-sdk","purl":null,"source":"GHSA-w5w5-2882-47pc"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["0.50.0-alpha.1"],"package":"github.com/cosmos/cosmos-sdk","purl":"pkg:golang/github.com/cosmos/cosmos-sdk","source":"GHSA-w5w5-2882-47pc"}],"products":null,"published":"2023-06-30","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":"Attackers can spam invariant checks without paying the required constant fee, causing excessive CPU usage and potential denial of service on validator nodes.","url":"https://insights.sbomify.com/GHSA-w5w5-2882-47pc/"}