Closed code423n4 closed 2 years ago
https://github.com/code-423n4/2022-04-abranft/blob/5cd4edc3298c05748e952f8a8c93e42f930a78c2/contracts/BentoBoxFlat.sol#L919
Due to the lack of access modifier in BentoboxV1.transfer(), anyone can transfer the shares to their account and can call withdrwa() function to get the funds
manual review
add a access modifier
allowed
closing, out of scope.
Lines of code
https://github.com/code-423n4/2022-04-abranft/blob/5cd4edc3298c05748e952f8a8c93e42f930a78c2/contracts/BentoBoxFlat.sol#L919
Vulnerability details
Impact
Due to the lack of access modifier in BentoboxV1.transfer(), anyone can transfer the shares to their account and can call withdrwa() function to get the funds
Proof of Concept
https://github.com/code-423n4/2022-04-abranft/blob/5cd4edc3298c05748e952f8a8c93e42f930a78c2/contracts/BentoBoxFlat.sol#L919
Tools Used
manual review
Recommended Mitigation Steps
add a access modifier