Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: high
Invalid

Replay Attack in the function verify in the contract NativeMetaTransaction.sol

Summary

Since there’s no nonce or timestamp check in this function, an attacker could reuse a valid signature from a previous transaction, effectively replaying an old transaction.

Vulnerability Details

if a user signed a transaction that performs a specific action, an attacker could repeatedly reuse this signature to trigger the same action multiple times.
https://github.com/Cyfrin/2024-11-one-world/blob/main/contracts/meta-transaction/NativeMetaTransaction.sol#L90-#L107

return
signer ==
ecrecover(
toTypedMessageHash(hashMetaTransaction(metaTx)),
sigV,
sigR,
sigS
);

Impact

This would allow the attacker to repeatedly potentially draining funds or causing unexpected state changes in the contract.

Tools Used

Manual code review

Recommendations

Add a nonce field in MetaTransaction and store the used nonces for each signer in the contract.

Updates

Lead Judging Commences

0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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