Skip to content
Business logic Write-up Advanced

Cronos Gravity Bridge

Two bugs in the Cronos Gravity Bridge: an attacker could cause a nonce mismatch by deploying an ERC-20 with an invalid Cosmos denomination, halting Ethereum-to-Cronos transfers; and a malicious token could trigger a supply overflow check, disabling the bridge entirely.

faith2dxy.xyz

Published on faith2dxy.xyz

In January 2023, I found and reported two separate bugs to the Cronos Gravity Bridge project on Immunefi. The first bug would allow an attacker to halt all cross-chain transfers from Ethereum to Cronos (one-way).

The author, on faith2dxy.xyz

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the bridge validated event data too early (causing a nonce mismatch) and treated a malicious supply as a fatal error that disabled the whole bridge.

Impact

The first bug temporarily halted Ethereum-to-Cronos transfers, while the second bug disabled the entire bridge; both were rated Medium severity.

What the attacker needed

Ability to deploy a token on Ethereum; ability to call bridge contract functions

The fix

The first bug was fixed by moving the denomination validation to a later stage, and the second by returning nil instead of an error when a malicious supply is detected.

How it was found

  1. Set up a local Gravity Bridge test environment.
  2. Deploy an ERC-20 token with a Cosmos denomination longer than 128 characters.
  3. Observe the orchestrator logs showing a nonce mismatch and infinite loop.
  4. Deploy a malicious token that returns a huge balance after transferFrom.
  5. Send tokens to the bridge with an amount of 2^256 - 1.
  6. Perform a zero-amount transfer and send again to overflow the supply, disabling the bridge.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A bridge moves tokens between two blockchains. The first bug let someone create a token with a bad name that made the bridge's software get stuck waiting forever, so no more transfers from Ethereum to Cronos could be processed. The second bug let someone create a fake token that reported a huge supply, which made the bridge think something was wrong and switch itself off.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.