# GHSA-4wf3-5qj9-368v: IBC-Go: Non-deterministic JSON Unmarshalling of IBC Acknowledgement can result in a chain halt

> Non-deterministic JSON unmarshalling in IBC-Go allows attackers to halt blockchain networks by opening channels.

- **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 Mar 2025
- **Also known as:** GO-2025-3517

## What is GHSA-4wf3-5qj9-368v?

GHSA-4wf3-5qj9-368v is an unsafe deserialization vulnerability in github.com/cosmos/ibc-go, published on 12 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Name: ISA-2025-001: Non-deterministic JSON Unmarshalling of IBC Acknowledgement can result in a chain halt
Component: IBC-Go
Criticality: High (Considerable Impact; Likely Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md))
Affected versions: IBC-Go >= v7; Earlier IBC-Go versions MAY also be affected.
Affected users: Validators, Full nodes, IBC Middleware authors

### Description

An issue was discovered in IBC-Go's deserialization of acknowledgements that results in non-deterministic behavior which can halt a chain. Any user that can open an IBC channel can introduce this state to the chain. The following patch is in addition to the previous patch which now extends the same protection to all applications beyond transfer.

### Patches

The new IBC-Go releases below address this issue:

* [v7.10.0](https://github.com/cosmos/ibc-go/releases/tag/v7.10.0)
* [v8.7.0](https://github.com/cosmos/ibc-go/releases/tag/v8.7.0)

### Workarounds

To prevent this state from being introduced to a chain, it is possible to permission Channel Opening as a workaround.

### Notes on Re-Release

This is an extension of the previous patch, please update to the latest patch to get full coverage against the reported issue.

#### Is this state breaking?

This patch is not state breaking unless an exploit is submitted before the patch is applied across the network in which case the chain will halt just as if it was unpatched. Thus, you can safely apply this patch in a rolling manner and encourage validators to patch as soon as possible in order to prevent any chain halts (and we've already cut new versions of these for you).

#### Testing we have done to gain more confidence in this release
* In addition to testing ibc-go, we also did the following:
* Tested PFM v7 and v8 after bumping dependencies
* Tested ibc-hooks v7 and v8 after bumping dependencies
* Ran a patched node on Cosmos Hub Mainnet and triggered failing and successful transactions that used PFM
* Ran a patched node on Osmosis mainnet and triggered failing and successful transactions that used ibc-hooks
This is a more thorough process than before, so we have higher confidence.

This issue was reported to the Cosmos Bug Bounty Program by swelf19 on HackerOne on February 18, 2025. If you believe you have found a bug in the Interchain Stack or would like to contribute to the program by reporting a bug, please see https://hackerone.com/cosmos.

If you have questions about Interchain security efforts, please reach out to our official communication channel at [security@interchain.io](mailto:security@interchain.io). For more information about the Interchain Foundation’s engagement with Amulet, and to sign up for security notification emails, please see https://github.com/interchainio/security.  

A Github Security Advisory for this issue is available in the IBC-Go [repository](https://github.com/cosmos/ibc-go/security/advisories/GHSA-4wf3-5qj9-368v).

## Which versions are affected by GHSA-4wf3-5qj9-368v?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cosmos/ibc-go` | Go | All versions | None |
| `github.com/cosmos/ibc-go` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v2` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v2` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v2` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v3` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v3` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v3` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v4` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v4` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v4` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v5` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v5` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v5` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v6` | Go | All versions | None |
| `github.com/cosmos/ibc-go/v6` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v6` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v7` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v7` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v7` | Go | All versions | 7.10.0 |
| `github.com/cosmos/ibc-go/v8` | Go | From 8.0.0-alpha.1 | 8.7.0 |
| `github.com/cosmos/ibc-go/v8` | Go | From 8.0.0-alpha.1 | 8.7.0 |
| `github.com/cosmos/ibc-go/v8` | Go | From 8.0.0-alpha.1 | 8.7.0 |

## How do I fix GHSA-4wf3-5qj9-368v?

Upgrade github.com/cosmos/ibc-go to 7.10.0 or later.

## Is GHSA-4wf3-5qj9-368v being exploited?

There is no known exploitation of GHSA-4wf3-5qj9-368v in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-4wf3-5qj9-368v and fix it if it is affected.

What it is: GHSA-4wf3-5qj9-368v is an unsafe deserialization vulnerability in github.com/cosmos/ibc-go, published on 12 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-4wf3-5qj9-368v in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cosmos/ibc-go (Go): affected all versions; no fix listed
- github.com/cosmos/ibc-go (Go): affected all versions; fixed in 7.10.0
- github.com/cosmos/ibc-go (Go): affected all versions; fixed in 7.10.0
- github.com/cosmos/ibc-go/v2 (Go): affected all versions; no fix listed
- github.com/cosmos/ibc-go/v2 (Go): affected all versions; fixed in 7.10.0
- github.com/cosmos/ibc-go/v2 (Go): affected all versions; fixed in 7.10.0
- github.com/cosmos/ibc-go/v3 (Go): affected all versions; no fix listed
- github.com/cosmos/ibc-go/v3 (Go): affected all versions; fixed in 7.10.0
- github.com/cosmos/ibc-go/v3 (Go): affected all versions; fixed in 7.10.0
- 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 7.10.0
- github.com/cosmos/ibc-go/v4 (Go): affected all versions; fixed in 7.10.0

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-4wf3-5qj9-368v/ (Markdown: https://insights.sbomify.com/GHSA-4wf3-5qj9-368v/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-4wf3-5qj9-368v

---
From sbomify Insights: https://insights.sbomify.com/GHSA-4wf3-5qj9-368v/
Summaries are generated and may contain mistakes; the official description above is the record.
