_setupRole() Deprecated and Not Using With Constructor Effectively Circumventing the Admin System #115
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
Meta0xNull
Vulnerability details
Impact
There are multiple contracts that import Permissions.sol and using Deprecated Function _setupRole() with Security Problem that Applicable to all these contracts because all of the contracts use initialize() Rather Than Constructor.
Proof of Concept
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol#L174-L186
https://github.com/code-423n4/2021-11-malt/blob/main/src/contracts/Permissions.sol#L53
https://github.com/code-423n4/2021-11-malt/blob/main/src/contracts/Permissions.sol#L117
https://github.com/code-423n4/2021-11-malt/blob/main/src/contracts/Permissions.sol#L121
Tools Used
Manual Review
Recommended Mitigation Steps
Replace _setupRole() with _grantRole()
The text was updated successfully, but these errors were encountered: