# GHSA-qjcv-rx3v-7mvj: Inter-Blockchain Communication (IBC) protocol "Huckleberry" vulnerability in github.com/cosmos/ibc-go

> Attackers can steal funds by sending arbitrary transactions to target chains via IBC relaying flaws in specific fee-grant configurations.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 May 2024
- **Also known as:** GO-2024-2874

## What is GHSA-qjcv-rx3v-7mvj?

GHSA-qjcv-rx3v-7mvj is a vulnerability in github.com/cosmos/ibc-go, published on 20 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The ibc-go module is affected by the Inter-Blockchain Communication (IBC) protocol "Huckleberry" vulnerability. The vulnerability allowed an attacker to send arbitrary transactions onto target chains and trigger arbitrary state transitions, including but not limited to, theft of funds. It was possible to exploit this vulnerability in specific situations involving relaying packets in which the source chain is also the final destination chain. Affected networks are those that allow for fee grant capabilities and use a native Relayer (e.g., Osmosis and Juno).

## Which versions are affected by GHSA-qjcv-rx3v-7mvj?

29 open source packages ship an affected version, including github.com/cosmos/ibc-go/v4, github.com/cosmos/ibc-go and github.com/cosmos/ibc-go/v2.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cosmos/ibc-go/v4` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v4` | Go | All versions | 4.1.3 |
| `github.com/cosmos/ibc-go/v4` | Go | All versions | 4.1.3 |
| `github.com/cosmos/ibc-go/v4` | Go | From 4.2.0 | 4.2.2 |
| `github.com/cosmos/ibc-go/v4` | Go | From 4.2.0 | 4.2.2 |
| `github.com/cosmos/ibc-go/v4` | Go | From 4.3.0 | 4.3.1 |
| `github.com/cosmos/ibc-go/v4` | Go | From 4.3.0 | 4.3.1 |
| `github.com/cosmos/ibc-go/v4` | Go | From 4.4.0 | 4.4.1 |
| `github.com/cosmos/ibc-go/v4` | Go | From 4.4.0 | 4.4.1 |
| `github.com/cosmos/ibc-go` | Go | All versions | None |
| `github.com/cosmos/ibc-go` | Go | All versions to 1.5.0 | None |
| `github.com/cosmos/ibc-go` | Go | All versions to 1.5.0 | None |
| `github.com/cosmos/ibc-go/v2` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v2` | Go | All versions to 2.5.0 | None |
| `github.com/cosmos/ibc-go/v2` | Go | All versions to 2.5.0 | None |
| `github.com/cosmos/ibc-go/v3` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v3` | Go | All versions to 3.4.0 | None |
| `github.com/cosmos/ibc-go/v3` | Go | All versions to 3.4.0 | None |
| `github.com/cosmos/ibc-go/v5` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v5` | Go | All versions | 5.2.1 |
| `github.com/cosmos/ibc-go/v5` | Go | All versions | 5.2.1 |
| `github.com/cosmos/ibc-go/v5` | Go | From 5.3.0 | 5.3.1 |
| `github.com/cosmos/ibc-go/v5` | Go | From 5.3.0 | 5.3.1 |
| `github.com/cosmos/ibc-go/v6` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v6` | Go | All versions | 6.1.1 |
| `github.com/cosmos/ibc-go/v6` | Go | All versions | 6.1.1 |
| `github.com/cosmos/ibc-go/v7` | Go | All versions | 7.0.1 |
| `github.com/cosmos/ibc-go/v7` | Go | All versions | 7.0.1 |
| `github.com/cosmos/ibc-go/v7` | Go | All versions | 7.0.1 |

## How do I fix GHSA-qjcv-rx3v-7mvj?

Upgrade github.com/cosmos/ibc-go/v4 to a fixed version for your release line: 4.1.3, 4.2.2, 4.3.1 or 4.4.1.

## Is GHSA-qjcv-rx3v-7mvj being exploited?

There is no known exploitation of GHSA-qjcv-rx3v-7mvj in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-qjcv-rx3v-7mvj and fix it if it is affected.

What it is: GHSA-qjcv-rx3v-7mvj is a vulnerability in github.com/cosmos/ibc-go, published on 20 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-qjcv-rx3v-7mvj in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cosmos/ibc-go/v4 (Go): affected all versions; no fix listed
- github.com/cosmos/ibc-go/v4 (Go): affected all versions; fixed in 4.1.3
- github.com/cosmos/ibc-go/v4 (Go): affected all versions; fixed in 4.1.3
- github.com/cosmos/ibc-go/v4 (Go): affected from 4.2.0; fixed in 4.2.2
- github.com/cosmos/ibc-go/v4 (Go): affected from 4.2.0; fixed in 4.2.2
- github.com/cosmos/ibc-go/v4 (Go): affected from 4.3.0; fixed in 4.3.1
- github.com/cosmos/ibc-go/v4 (Go): affected from 4.3.0; fixed in 4.3.1
- github.com/cosmos/ibc-go/v4 (Go): affected from 4.4.0; fixed in 4.4.1
- github.com/cosmos/ibc-go/v4 (Go): affected from 4.4.0; fixed in 4.4.1
- github.com/cosmos/ibc-go (Go): affected all versions; no fix listed
- github.com/cosmos/ibc-go (Go): affected all versions up to 1.5.0; no fix listed
- github.com/cosmos/ibc-go (Go): affected all versions up to 1.5.0; no fix listed

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-qjcv-rx3v-7mvj/ (Markdown: https://insights.sbomify.com/GHSA-qjcv-rx3v-7mvj/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-qjcv-rx3v-7mvj

---
From sbomify Insights: https://insights.sbomify.com/GHSA-qjcv-rx3v-7mvj/
Summaries are generated and may contain mistakes; the official description above is the record.
