You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
completeWithdrawal(bool isNative, uint256 requestId) allows any address to complete any user's ERC721-based withdrawal request. The underlying _burnWithdrawalRequest in WBERAStakerVaultWithdrawalRequest calls _burn(requestId) which does not verify the caller is the NFT owner.
Impact
Low — No fund theft is possible because assets are sent to request.receiver (set at queue time, not controlled by the caller). However:
An attacker can force-complete someone else's withdrawal before the user is ready
The attacker chooses the isNative flag, potentially sending native BERA instead of WBERA (or vice versa)
Note: cancelQueuedWithdrawal correctly checks NFT ownership (line 240), but completeWithdrawal does not.
Summary
completeWithdrawal(bool isNative, uint256 requestId)allows any address to complete any user's ERC721-based withdrawal request. The underlying_burnWithdrawalRequestinWBERAStakerVaultWithdrawalRequestcalls_burn(requestId)which does not verify the caller is the NFT owner.Impact
Low — No fund theft is possible because assets are sent to
request.receiver(set at queue time, not controlled by the caller). However:isNativeflag, potentially sending native BERA instead of WBERA (or vice versa)Note:
cancelQueuedWithdrawalcorrectly checks NFT ownership (line 240), butcompleteWithdrawaldoes not.Affected Code
WBERAStakerVault.sol#L263-L266— No ownership checkWBERAStakerVaultWithdrawalRequest.sol#L161-L171—_burndoes not check callerCompare with
cancelQueuedWithdrawalwhich does check ownership:Recommended Fix
Add the same ownership check to
completeWithdrawal: