NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Replay Attack in _consumeMessageAutoWithdraw

https://github.com/Cyfrin/2024-07-ark-project/blob/273b7b94986d3914d5ee737c99a59ec8728b1517/apps/blockchain/ethereum/src/Messaging.sol#L69

Description:

The _consumeMessageAutoWithdraw function calculates the message hash based on the sender's address, recipient address, and the request data. However, it does not include any nonce or timestamp in the hash calculation. This makes it susceptible to replay attacks. An attacker could intercept a valid message and its hash, then replay the same message later to withdraw the tokens again, effectively doubling the withdrawal.

Impact:

This vulnerability is high impact because it allows an attacker to steal tokens by reusing valid messages. If exploited, it could lead to significant financial losses for users and undermine the trust in the bridge.

Updates

Lead Judging Commences

n0kto Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
Assigned finding tags:

invalid-replay-attack-hash-not-stored-nonce-not-used

There is no impact here: Transaction cannot be replayed because the blockchain use the nonce in the signature. Hash is computed on-chain. Using or trying to have the same hash mean you need to buy the token, and they will be sent to their origin owner. Why an attacker would buy tokens to give them back ? No real impact.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.