Observer can halt outbound cctxs and steal funds
A single observer could add transactions to the inbound and outbound trackers without a Merkle proof, causing zetaclients to error or vote for fake transactions. This could halt outbound cross-chain transactions and allow draining funds.
Originally disclosed on Code4rena
Submitted by berndartmueller
A single observer has too much power over the ZetaChain network, allowing them to halt outbound cctxs and steal funds.
Proof of Concept
Both the MsgAddToInTxTracker and MsgAddToOutTxTracker messages allow observers to add a transaction to the tracker without providing Merkle proof to verify if the transaction is valid.
This is a real risk to ZetaChain as a single malicious observer is able to cause significant harm.
For example, the MsgAddToInTxTracker message can be misused in the following ways:
- Spam with the
InTxTrackerwith a lot of transactions: Add transactions that will cause the zetaclients to fail/error while processing them -> this will cause the zetaclient to stop processing other legitimate messages in theObserveTrackerSuggestionsfunction. A tx with a hash that’s non-existent causes the zetaclient to error and stops the current loop iteration of the tracker tx’s - Add an inbound transaction that does not have one of the desired contracts as the
tx.To. This causes the zetaclients to vote for a “fake” transaction which could forgeDepositorZetaSentevents. Consequently, this allows draining funds.
Similarly, trusting observers to not misbehave with MsgAddToOutTxTracker messages imposes a trust issue as well.
Moreover, a single malicious observer can mess with the external chain nonces by using the (deprecated) MsgNonceVoter message, halting outbound cctx’s due to nonce mismatches.
Please note: This submission demonstrates the impact on cctxs while the “A single malicious observer can fill the block space with
MsgGasPriceVotermessages without proper gas compensation resulting in griefing blocks” submission shows how the whole ZetaChain network (not only inbound/outbound cctx’s) can be significantly impacted (and griefed) by a single observer.
Recommended mitigation steps
Re-consider the trust model of the MsgAddToInTxTracker and MsgAddToOutTxTracker messages and possibly also require a Merkle proof from observers.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The tracker messages accept observer-submitted transactions without requiring a Merkle proof to verify their validity.
Impact
A single malicious observer could halt outbound cross-chain transactions and potentially drain funds by forging deposit or sent events.
What the attacker needed
Be an observer on ZetaChain
The fix
The trust model of the tracker messages should be reconsidered, possibly by requiring a Merkle proof from observers.
How it was found
- An observer sends a MsgAddToInTxTracker message with a non-existent transaction hash.
- The zetaclient errors while processing the suggestion and stops the current loop iteration.
- Alternatively, the observer adds an inbound transaction whose recipient is not a desired contract.
- Zetaclients vote for the fake transaction, potentially forging Deposit or ZetaSent events.
- The observer can also use MsgNonceVoter to mess with external chain nonces, halting outbound cctxs.
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 report has not been written yet. The Original tab links to the source.
In this blockchain system, observers are nodes that watch other chains and report transactions. The report says one observer could lie about transactions without proof, which might make the system stop working or lose money.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.