Submitted by 0xlemon, also found by 0xlemon and MrPotatoMagic
https://github.com/code-423n4/2024-12-bakerfi/blob/main/contracts/core/VaultBase.sol#L237-L271
The recipient of the vault shares isnt checked to be in the whitelist. This means that a non-whitelisted user can receive shares and then withdraw/redeem them throught the VaultRouter.
If we look at VaultBase deposit/mint/withdraw/redeem functions have a onlyWhiteListed modifier that means they can only be called by someone who is within the _enabledAccounts. However the protocol doesnt check if the receiver is included in that whitelist. This allows non-whitelisted people to receive shares and they can later easily withdraw them through the VaultRouter.
Bypass of the whitelist
Check if the receiver of the vault shares is whitelisted
chefkenji (BakerFi) confirmed
BakerFi mitigated:
Status: Mitigation confirmed. Full details in reports from shaflow2 and 0xlemon.
