First Flight #12: Kitty Connect

First Flight #12: Kitty Connect
Beginner FriendlyFoundryNFTGameFi
100 EXP
View results
Submission Details
Severity: high
Valid

The bridged NFT will be lost for the users using account abstraction

Summary

All users using account abstraction wallets will not be able to bridge their NFT from one chain to another. This because they have different addresses across chain for the same account and therefore, all the NFTs will be bridged to a wrong address and lost forever

Vulnerability Details

The modifier onlyAllowlisted uses msg.sender as the address of the sender but this is not true when using account abstraction wallets

function _ccipReceive(Client.Any2EVMMessage memory any2EvmMessage)
internal
override
onlyAllowlisted(any2EvmMessage.sourceChainSelector, msg.sender)
{
KittyConnect(kittyConnect).mintBridgedNFT(any2EvmMessage.data);
emit MessageReceived(
any2EvmMessage.messageId,
any2EvmMessage.sourceChainSelector,
abi.decode(any2EvmMessage.sender, (address)),
any2EvmMessage.data
);
}

Impact

For all account abstraction wallet users, all the NFTs will be bridged to a wrong address and lost forever

Tools Used

Manual review

Recommendations

Recommendations

Give the users the option to pass in the sender address

- function _ccipReceive(Client.Any2EVMMessage memory any2EvmMessage)
+ function _ccipReceive(Client.Any2EVMMessage memory any2EvmMessage, address sender)
internal
override
- onlyAllowlisted(any2EvmMessage.sourceChainSelector, msg.sender)
+ onlyAllowlisted(any2EvmMessage.sourceChainSelector, sender)
{
KittyConnect(kittyConnect).mintBridgedNFT(any2EvmMessage.data);
emit MessageReceived(
any2EvmMessage.messageId,
any2EvmMessage.sourceChainSelector,
abi.decode(any2EvmMessage.sender, (address)),
any2EvmMessage.data
);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Account abstraction

Support

FAQs

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