CVE-2021-41135: Github.com/cosmos/cosmos sdk Authz Module Non-Determinism Vulnerability

MODERATE
Advisory Identifier: GHSA-2p6r-37p9-89p2
CVSS 6.5
CWE-754
Published
Advisory Summary

CVE-2021-41135 is a MODERATE (CVSS 6.5) authz module non-determinism vulnerability (CWE-754: Improper Check for Unusual or Exceptional Conditions) affecting Github.com/cosmos/cosmos sdk libraries in the Go ecosystem. The issue involves authz module non-determinism. Remediation is available by upgrading affected packages to version 0.44.2.

CVE-2021-41135 at a Glance

CVE Identifier CVE-2021-41135
GHSA Identifier GHSA-2p6r-37p9-89p2
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-754: Improper Check for Unusual or Exceptional Conditions
Affected Product Github.com/cosmos/cosmos sdk
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2021-41135

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.

github.com/cosmos/cosmos-sdk fixed: 0.44.2
Upgrade github.com/cosmos/cosmos-sdk to 0.44.2
Verify Direct and Transitive Dependencies

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 CVE-2021-41135, 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 0.44.2), 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-754: Improper Check for Unusual or Exceptional Conditions, where the product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product. 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

### Impact Consensus failure for 0.43.x and 0.44.{0,1} users. Funds and balances are safe. ### Patches 0.44.2 ### Workarounds Manually patch the code. --- Full details posted in https://forum.cosmos.network/t/cosmos-sdk-vulnerability-retrospective-security-advisory-jackfruit-october-12-2021/5349.

CVE-2021-41135 Affected Github.com/cosmos/cosmos sdk Versions

1 component(s)
Fixed Versions:
0.44.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cosmos/cosmos-sdk
Go
≥ 0.43.0
< 0.44.2
0.44.2

References

Frequently Asked Questions

What is CVE-2021-41135?
CVE-2021-41135 is a security vulnerability in Github.com/cosmos/cosmos sdk involving Authz Module Non-Determinism under CWE-754: Improper Check for Unusual or Exceptional Conditions.
Which Github.com/cosmos/cosmos sdk versions are affected?
Affected versions include releases prior to 0.44.2 across affected packages: github.com/cosmos/cosmos-sdk.
What version fixes CVE-2021-41135?
Upgrading to 0.44.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cosmos/cosmos-sdk affected?
Yes, github.com/cosmos/cosmos-sdk is affected in releases prior to 0.44.2. Upgrade your dependency to 0.44.2 or later.
What is the CVSS score of CVE-2021-41135?
CVE-2021-41135 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-41135?
CVE-2021-41135 is classified under CWE-754: Improper Check for Unusual or Exceptional Conditions (The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.).
How can I check Go dependencies for CVE-2021-41135?
Run the dependency tree command: 'inspect dependencies for github.com/cosmos/cosmos-sdk'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2p6r-37p9-89p2",
  "modified" : "2021-10-21T14:32:55Z",
  "published" : "2021-10-21T17:46:57Z",
  "aliases" : [ "CVE-2021-41135" ],
  "summary" : "Authz Module Non-Determinism",
  "details" : "### Impact\n\nConsensus failure for 0.43.x and 0.44.{0,1} users. \nFunds and balances are safe.\n\n### Patches\n\n0.44.2\n\n### Workarounds\n\nManually patch the code.\n\n---\n\nFull details posted in https://forum.cosmos.network/t/cosmos-sdk-vulnerability-retrospective-security-advisory-jackfruit-october-12-2021/5349.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cosmos/cosmos-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.43.0"
      }, {
        "fixed" : "0.44.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-2p6r-37p9-89p2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41135"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/commit/68ab790a761e80d3674f821794cf18ccbfed45ee"
  }, {
    "type" : "WEB",
    "url" : "https://forum.cosmos.network/t/cosmos-sdk-vulnerability-retrospective-security-advisory-jackfruit-october-12-2021/5349"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cosmos/cosmos-sdk"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-754" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-10-20T15:36:34Z",
    "nvd_published_at" : "2021-10-20T18:15:00Z"
  }
}