Missing access restriction on lockUnits/unlockUnits
The Pool.lockUnits function lacks access control, allowing any caller to transfer pool tokens from a member to themselves. An attacker could steal pool tokens from any other user.
Vader Protocol contest
Originally disclosed on Code4rena
The Pool.lockUnits allows anyone to steal pool tokens from a member and assign them to msg.sender. Anyone can steal pool tokens from any other user.
Recommend adding access control and require that msg.sender is the router or another authorized party.
strictly-scarce (vader) confirmed:
Valid, although this is part of the partially-complete lending code.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The function lockUnits (and likely unlockUnits) lacks any access control, allowing any caller to specify an arbitrary member and move their tokens.
Impact
Anyone could steal pool tokens from any other user, although the affected code is described as partially complete lending code.
What the attacker needed
None
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract function that moves tokens between users did not check who was calling it. Anyone could call it and take tokens from someone else. This is like a bank teller who gives out money to anyone who asks, without checking if they own the account.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.