The PrincipalToken inherits from PausableUpgradeable, thus it can be paused.
One of the function - claimFees(), however, does not implement whenNotPaused modifier - meaning, that it's possible to claim the collected ibt fees and redeem them to the fee collector - even when the contract is paused.
Lines of code
https://github.com/code-423n4/2024-02-spectra/blob/383202d0b84985122fe1ba53cfbbb68f18ba3986/src/tokens/PrincipalToken.sol#L329-L336
Vulnerability details
Impact
The
PrincipalToken
inherits fromPausableUpgradeable
, thus it can be paused. One of the function -claimFees()
, however, does not implementwhenNotPaused
modifier - meaning, that it's possible to claim the collected ibt fees and redeem them to the fee collector - even when the contract is paused.Proof of Concept
File: PrincipalToken.sol
As demonstrated above, function
claimFees()
misses thewhenNotPaused
modifier - thus it's possible to call it even when the contract is paused.PricinpalToken
claimFees()
Because
claimFees()
does not verify if contract is paused - it's possible to call this function even on the paused contract.Tools Used
Manual code review
Recommended Mitigation Steps
Add
whenNotPaused
modifier toclaimFees()
function. It should not be possible to call this function when contract is paused.Assessed type
Access Control