Owners can set function and collection admins #1383
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-303
edited-by-warden
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenAdmins.sol#L44
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenAdmins.sol#L50
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenAdmins.sol#L58
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenAdmins.sol#L31
Vulnerability details
https://seize-io.gitbook.io/nextgen/nextgen-smart-contracts/minter
https://code4rena.com/contests/2023-10-nextgen#top
Impact
From the provided readme and documentation, the functions to register a function and a collection admin are only to be called by a global admin who are registered by the owners.
The
registerFunctionAdmin
,registerBatchFunctionAdmin
andregisterCollectionAdmin
functions are protected using theAdminRequired
modifier.However, the modifier is allows both the global admin and the owner. This gives the owner the ability to register function and collection admins which breaks the protocol's main invariant.
Proof of Concept
From the provided readme
and the provided documentation,
The registerFunction/Batch/CollectionAdmin functions uses the
AdminRequired
modifier.The
AdminRequired
modifier is defined - it allows the msg.sender to be a global admin or the owner.This allows the owner to be able to set these admins, but breaks the protocol's invariants.
Tools Used
Manual code review
Recommended Mitigation Steps
Updating the modifier, e.g
Assessed type
Access Control
The text was updated successfully, but these errors were encountered: