GHSA-j2cr-jc39-wpx5: Github.com/cosmos/cosmos sdk Barberry Security Advisory - Regarding Vulnerability

MODERATE
Published
Advisory Summary

GHSA-j2cr-jc39-wpx5 is a MODERATE barberry security advisory - regarding vulnerability (General Security Weakness) affecting Github.com/cosmos/cosmos sdk libraries in the Go ecosystem. The issue involves barberry security advisory - regarding x/auth periodic vesting accounts. Remediation is available by upgrading affected packages to version 0.46.13, 0.47.3.

GHSA-j2cr-jc39-wpx5 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-j2cr-jc39-wpx5
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Github.com/cosmos/cosmos sdk
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-j2cr-jc39-wpx5

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.46.13
Upgrade github.com/cosmos/cosmos-sdk to 0.46.13
github.com/cosmos/cosmos-sdk fixed: 0.47.3
Upgrade github.com/cosmos/cosmos-sdk to 0.47.3
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 GHSA-j2cr-jc39-wpx5, 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.46.13), 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

### Impact In `PeriodicVestingAccount`, defined in `x/auth`, an attacker can initialize a victim's account as a malicious vesting account, which allows deposits but does not allow withdrawals. When the user then deposits funds into their account, those funds are locked forever, and the user is not able to withdraw them. ### Patches \>= v0.46.13 for Cosmos SDK v0.46.x \>= v0.47.3 for Cosmos SDK v0.47.x If a network backported periodic vesting accounts to earlier versions of the SDK, those networks are affected too. ### Workarounds There is no workaround for this issue. Upgrade immediately. ### References * Patched versions release notes: [v0.47.3](https://github.com/cosmos/cosmos-sdk/blob/cfc757dc5043fb2758c47c146d2912fd010c1a45/RELEASE_NOTES.md#cosmos-sdk-v0473-release-notes), [v0.46.13](https://github.com/cosmos/cosmos-sdk/blob/d4b7164de5d8391e6aa644d8ea84e07396dd9653/RELEASE_NOTES.md#cosmos-sdk-v04613-release-notes). * [Forum Post](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry/10825)

GHSA-j2cr-jc39-wpx5 Affected Github.com/cosmos/cosmos sdk Versions

2 component(s)
Fixed Versions:
0.46.130.47.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cosmos/cosmos-sdk
Go
≥ 0.46.0
< 0.46.13
0.46.13
github.com/cosmos/cosmos-sdk
Go
≥ 0.47.0
< 0.47.3
0.47.3

References

Frequently Asked Questions

What is GHSA-j2cr-jc39-wpx5?
GHSA-j2cr-jc39-wpx5 is a security vulnerability in Github.com/cosmos/cosmos sdk involving Barberry Security Advisory - regarding x/auth periodic vesting accounts under General Security Weakness.
Which Github.com/cosmos/cosmos sdk versions are affected?
Affected versions include releases prior to 0.46.13, 0.47.3 across affected packages: github.com/cosmos/cosmos-sdk.
What version fixes GHSA-j2cr-jc39-wpx5?
Upgrading to 0.46.13, 0.47.3 (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.46.13, 0.47.3. Upgrade your dependency to 0.46.13, 0.47.3 or later.
What CWE is associated with GHSA-j2cr-jc39-wpx5?
GHSA-j2cr-jc39-wpx5 is classified under General Security Weakness.
How can I check Go dependencies for GHSA-j2cr-jc39-wpx5?
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-j2cr-jc39-wpx5",
  "modified" : "2023-07-07T18:34:27Z",
  "published" : "2023-07-07T18:34:27Z",
  "aliases" : [ ],
  "summary" : "Barberry Security Advisory - regarding x/auth periodic vesting accounts",
  "details" : "### Impact\n\nIn `PeriodicVestingAccount`, defined in `x/auth`, an attacker can initialize a victim's account as a malicious vesting account, which allows deposits but does not allow withdrawals. When the user then deposits funds into their account, those funds are locked forever, and the user is not able to withdraw them.\n\n### Patches\n\n\\>= v0.46.13 for Cosmos SDK v0.46.x\n\\>= v0.47.3 for Cosmos SDK v0.47.x\n\nIf a network backported periodic vesting accounts to earlier versions of the SDK, those networks are affected too.\n\n### Workarounds\n\nThere is no workaround for this issue. Upgrade immediately.\n\n### References\n\n* Patched versions release notes: [v0.47.3](https://github.com/cosmos/cosmos-sdk/blob/cfc757dc5043fb2758c47c146d2912fd010c1a45/RELEASE_NOTES.md#cosmos-sdk-v0473-release-notes), [v0.46.13](https://github.com/cosmos/cosmos-sdk/blob/d4b7164de5d8391e6aa644d8ea84e07396dd9653/RELEASE_NOTES.md#cosmos-sdk-v04613-release-notes).\n* [Forum Post](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry/10825)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cosmos/cosmos-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.46.0"
      }, {
        "fixed" : "0.46.13"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.46.12"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cosmos/cosmos-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.47.0"
      }, {
        "fixed" : "0.47.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.47.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-j2cr-jc39-wpx5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/pull/16466"
  }, {
    "type" : "WEB",
    "url" : "https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry/10825"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cosmos/cosmos-sdk"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/blob/cfc757dc5043fb2758c47c146d2912fd010c1a45/RELEASE_NOTES.md#cosmos-sdk-v0473-release-notes"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cosmos/cosmos-sdk/blob/d4b7164de5d8391e6aa644d8ea84e07396dd9653/RELEASE_NOTES.md#cosmos-sdk-v04613-release-notes"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-07T18:34:27Z",
    "nvd_published_at" : null
  }
}