There is a critical issue in the NFT bridging process between Starknet and Ethereum. Although the auto-withdrawal feature has been disabled on the Ethereum side, users can still set the use_withdraw_auto
flag to true on the Starknet bridge contract. If an NFT is transferred with this flag enabled, it will become stuck in the Ethereum bridge contract, rendering it impossible to withdraw. This results in the permanent loss of access to the NFT.
Below is a code snippet from the Ethereum bridge contract responsible for handling the withdrawal of NFTs:
In this code, the withdrawTokens
function manages the withdrawal of NFTs from the Ethereum bridge contract. If the use_withdraw_auto
flag is found to be true (indicated by the Protocol.canUseWithdrawAuto(header)
function), the function immediately reverts with a NotSupportedYetError
.
The impact of this vulnerability is severe. Users who mistakenly set the use_withdraw_auto
flag to true while bridging their NFTs from Starknet to Ethereum will find that their NFTs get stuck in the Ethereum bridge contract. Due to the revert in the withdrawal function, these NFTs cannot be retrieved, effectively causing the user to lose their assets permanently.
Manual Review
To prevent this issue, the Starknet bridge contract should be modified to prevent users from setting the use_withdraw_auto
flag to true.
Here is a suggested modification to the Starknet bridge contract:
Impact: High, token will be stuck in L2 bridge. Likelyhood: Very low, option is available in L2 but has been disabled since March on L1, would be almost a user error.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.