Submitted by aphak5010
https://github.com/code-423n4/2022-11-stakehouse/blob/4b6828e9c807f2f7c569e6d721ca1289f7cf7112/contracts/smart-wallet/OwnableSmartWallet.sol#L94
https://github.com/code-423n4/2022-11-stakehouse/blob/4b6828e9c807f2f7c569e6d721ca1289f7cf7112/contracts/smart-wallet/OwnableSmartWallet.sol#L105-L106
The OwnableSmartWallet contract employs a mechanism for the owner to approve addresses that can then claim ownership (https://github.com/code-423n4/2022-11-stakehouse/blob/4b6828e9c807f2f7c569e6d721ca1289f7cf7112/contracts/smart-wallet/OwnableSmartWallet.sol#L94) of the contract.
The source code has a comment included which states that Approval is revoked, in order to avoid unintended transfer allowance if this wallet ever returns to the previous owner (https://github.com/code-423n4/2022-11-stakehouse/blob/4b6828e9c807f2f7c569e6d721ca1289f7cf7112/contracts/smart-wallet/OwnableSmartWallet.sol#L105-L106).
This means that when ownership is transferred from User A to User B, the approvals that User A has given should be revoked.
The existing code does not however revoke all approvals that User A has given. It only revokes one approval.
This can lead to unwanted transfers of ownership.
VSCode
You should invalidate all approvals User A has given when another User becomes the owner of the OwnableSmartWallet.
Unfortunately you cannot use a statement like delete _isTransferApproved[owner()].
So you would need an array that keeps track of approvals as pointed out in this StackExchange question: https://ethereum.stackexchange.com/questions/15553/how-to-delete-a-mapping
vince0656 (Stakehouse) confirmed
