# GHSA-8qxh-2gh8-r923: cheqd-node subject to Cosmos SDK "Barberry" vulnerability

> Attackers can exploit vesting account logic to halt the blockchain or modify state, requiring node operators to upgrade.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Jun 2023

## What is GHSA-8qxh-2gh8-r923?

GHSA-8qxh-2gh8-r923 is a vulnerability in github.com/cheqd/cheqd-node, published on 12 Jun 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact
This [vulnerability dubbed "Barberry" affects the Cosmos SDK framework](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry/10825) used by `cheqd-node` as base.

It impacts the way Cosmos SDK handles vesting accounts, and can therefore be a high-impact vulnerability for any network running the framework.

There is no vulnerability in the DID/resource modules for `cheqd-node`.

### Patches
Node operators are requested to upgrade to [cheqd-node v1.4.4](https://github.com/cheqd/cheqd-node/releases/tag/v1.4.4). This is not a state-breaking release and does not require a coordinated upgrade across all node operators.

This vulnerability was patched in [Cosmos SDK v0.46.13](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.13). Since this version switches to Go v1.19 and also changes the namespace of many Cosmos protobuf packages, the Barberry fix was [backported to cheqd's fork of Cosmos SDK](https://github.com/cheqd/cosmos-sdk/releases/tag/v0.46.10-barberry).

### Mitigation
When at least ~**33**% of the voting power of the network has deployed the recommended version of the software, any attack would be unsuccessful but cause a chain halt.

Once at least ~**67**% of the voting power of the network has deployed recommended version of the software, the attack would be unsuccessful _without_ a chain halt.

### Workarounds
No. Node operators are recommended to upgrade to the latest release version.

### References
- ["Barberry" vulnerability security advisory](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry/10825)
- [Cosmos SDK v0.46.13 release notes](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.13)

## Which versions are affected by GHSA-8qxh-2gh8-r923?

2 open source packages ship an affected version, including github.com/cheqd/cheqd-node.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cheqd/cheqd-node` | Go | All versions | 1.4.4 |
| `github.com/cheqd/cheqd-node` | Go | All versions | 1.4.4 |

## How do I fix GHSA-8qxh-2gh8-r923?

Upgrade github.com/cheqd/cheqd-node to 1.4.4 or later.

## Is GHSA-8qxh-2gh8-r923 being exploited?

There is no known exploitation of GHSA-8qxh-2gh8-r923 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-8qxh-2gh8-r923 and fix it if it is affected.

What it is: GHSA-8qxh-2gh8-r923 is a vulnerability in github.com/cheqd/cheqd-node, published on 12 Jun 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-8qxh-2gh8-r923 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cheqd/cheqd-node (Go): affected all versions; fixed in 1.4.4
- github.com/cheqd/cheqd-node (Go): affected all versions; fixed in 1.4.4

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-8qxh-2gh8-r923/ (Markdown: https://insights.sbomify.com/GHSA-8qxh-2gh8-r923/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-8qxh-2gh8-r923

---
From sbomify Insights: https://insights.sbomify.com/GHSA-8qxh-2gh8-r923/
Summaries are generated and may contain mistakes; the official description above is the record.
