Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
CRITICAL severity

GHSA-j496-crgh-34mx v4

CRITICALFix: cosmos/ibc-go@04275aa

GHSA-j496-crgh-34mx is a critical-severity (CVSS 9.1) vulnerability in github.com/cosmos/ibc-go/v4. A fix is available for github.com/cosmos/ibc-go/v4 — see the affected versions and patch details below.

ibc-go: Potential Reentrancy using Timeout Callbacks in ibc-hooks

Also known asGO-2024-2694
Published
Apr 5, 2024
Updated
May 20, 2024
Affected
8 pkgs
Patched
5 / 8
Exploits
None indexed
Exploitation data as of May 20, 2024 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

8 pkgs affected
🐹github.com/cosmos/ibc-go/v4🐹github.com/cosmos/ibc-go/v5🐹github.com/cosmos/ibc-go/v6🐹github.com/cosmos/ibc-go/v7🐹github.com/cosmos/ibc-go/v8🐹github.com/cosmos/ibc-go/v3🐹github.com/cosmos/ibc-go/v2🐹github.com/cosmos/ibc-go

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Name: ASA-2024-007: Potential Reentrancy using Timeout Callbacks in ibc-hooks Component: ibc-go Criticality: Critical (ACMv1: I:Critical; L:AlmostCertain) Affected versions: < v4.6.0, < v5.4.0, < v6.3.0, < v7.4.0, < v8.2.0 Affected users: Chain Builders + Maintainers

Summary

Through the deployment and subsequent use of a malicious CosmWasm contract via IBC interactions, an attacker could potentially execute the same MsgTimeout inside the IBC hook for the OnTimeout callback before the packet commitment is deleted. On chains where ibc-hooks wraps ICS-20, this vulnerability may allow for the logic of the OnTimeout callback of the transfer application to be recursively executed, leading to a condition that may present the opportunity for the loss of funds from the escrow account or unexpected minting of tokens.

Affected Configurations

Chains which satisfy all of the following requirements are considered to be impacted by this vulnerability:

  • Chain is IBC-enabled and uses a vulnerable version of ibc-go
  • Chain is CosmWasm-enabled and allows code uploads for wasm contracts by anyone, or by authorized parties (to a lesser extent)
  • Chain utilizes the ibc-hooks middleware and wraps ICS-20 transfer application

Next Steps for Impacted Chain Builders and Maintainers

It is advised to immediately upgrade to the latest patch fix version of ibc-go for your chain. If you have already applied a soft-patch through private coordination, we recommend additionally updating to the latest ibc-go version via normal software upgrade governance.

If you have not upgraded your chain yet, and you desire to mitigate exposure to this vulnerability in the meantime, it is advisable to limit code uploading for contracts to trusted parties on your chain.

If your chain only allows permissioned, access-controlled contract uploads, it is still strongly recommended to update to the latest patched ibc-go version for your chain per your normal software upgrade process.

Preparing for future coordination

If your chain would like to be included in future coordination efforts, please ensure your chain has a prominently displayed or otherwise easily available up-to-date email address for technical security contact available. A security.md file in the root of your projects’ code repository should contain this information. Additionally, please test this security contact with an unaffiliated email to ensure it works as expected and can receive emails from outside of your domain.

To ensure that your chain is included in future impact assessments, please keep your chain information up to date in the Cosmos Chain Registry with code location, network name, and public RPC and API endpoints in the details.

We recommend that all chains configure and practice the use of the Circuit Breaker module in the Cosmos SDK, as future vulnerability notifications may require the use of this mechanism as a mitigation against exploitation.

Recognition

This issue was reported to the Cosmos Bug Bounty Program on HackerOne on 3/26/24 by Maxwell Dulin (Strikeout) at Asymmetric Research. 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.

Notes

Due to the critical nature of this issue, both the ibc-go team and Amulet independently performed impact assessments for the ecosystem, which informed a risk-driven private patching effort that preceded this public release. This private patching effort significantly reduced the exposure of the ecosystem to this vulnerability. We appreciate the diligence and professionalism of all chains and validators involved with this effort – your ability to move quickly while maintaining confidentiality was instrumental in protecting the wider Interchain Ecosystem.

If you ever have questions about security coordination efforts, public or private, please reach out to our official communication channel at [email protected].

For more information about ibc-go, please see https://ibc.cosmos.network/main.

For more information about the Interchain Foundation’s engagement with Amulet, please see https://github.com/interchainio/security.

Affected Packages

8 total 5 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/cosmos/ibc-go/v4all versions4.6.0go get github.com/cosmos/ibc-go/v4@v4.6.0
🐹Gogithub.com/cosmos/ibc-go/v5all versions5.4.0go get github.com/cosmos/ibc-go/v5@v5.4.0
🐹Gogithub.com/cosmos/ibc-go/v6all versions6.3.0go get github.com/cosmos/ibc-go/v6@v6.3.0
🐹Gogithub.com/cosmos/ibc-go/v7all versions7.4.0go get github.com/cosmos/ibc-go/v7@v7.4.0
🐹Gogithub.com/cosmos/ibc-go/v8all versions8.2.0go get github.com/cosmos/ibc-go/v8@v8.2.0
🐹Gogithub.com/cosmos/ibc-go/v3all versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/cosmos/ibc-go/v4, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/cosmos/ibc-go/v4 to 4.6.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-j496-crgh-34mx is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-j496-crgh-34mx can be triaged on real exposure rather than presence alone.

Tailored to GHSA-j496-crgh-34mx. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

**Name**: ASA-2024-007: Potential Reentrancy using Timeout Callbacks in ibc-hooks **Component**: ibc-go **Criticality**: Critical ([ACMv1](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Critical; L:AlmostCertain) **Affected versions**: < v4.6.0, < v5.4.0, < v6.3.0, < v7.4.0, < v8.2.0 **Affected users**: Chain Builders + Maintainers # Summary Through the deployment and subsequent use of a malicious CosmWasm contract via IBC interactions, an attacker could potentially execute the same `MsgTimeout` inside the IBC hook for the `OnTimeout` callback befor
O3 Security · Impact-Aware SCA

Is GHSA-j496-crgh-34mx in your dependencies?

O3 Security finds GHSA-j496-crgh-34mx across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-j496-crgh-34mx: v4 (Critical 9.1) | O3 Security