Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The NEAR watcher might discard valid messages #4251

Open
djb15 opened this issue Jan 30, 2025 · 0 comments
Open

The NEAR watcher might discard valid messages #4251

djb15 opened this issue Jan 30, 2025 · 0 comments
Labels
bug Something isn't working guardian-support

Comments

@djb15
Copy link
Collaborator

djb15 commented Jan 30, 2025

Description

The Wormhole Near Watcher contains two issues in its event logs processing logic located in the file tx_processing.go that prevents some valid messages sent from NEAR to other chains from being successfully delivered.

The first issue arises from an incomplete status check, which verifies only the SuccessValue status. However, successful transactions on NEAR can also have a SuccessReceiptId status, leading to missed messages that fail to propagate to the destination chain.

The second issue is that if there are various calls to Wormhole's publish_message in the same receipt, only the last one will be processed as valid, while all other messages will be discarded.

In both cases, messages would be correctly processed in NEAR, but would not get to their destination, implying a potential loss/freezing of funds and a flawed communication between chains.

Recommendation

These issues are integrator specific and cannot be induced arbitrarily by an attacker. The current recommendation is to ensure any integrations use the SuccessValue receipt status and only make a single call to publish_message in the same receipt. It is also recommended that integrators on NEAR thoroughly test on testnet before a mainnet launch to ensure that their use case conforms with the limitations of the watcher.

Thanks to @neumo for reporting this behaviour via the Wormhole bug bounty program hosted by Immunefi

@djb15 djb15 added bug Something isn't working guardian-support labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working guardian-support
Projects
None yet
Development

No branches or pull requests

1 participant