-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centralized risk in global admins #750
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-303
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
141345 marked the issue as sufficient quality report |
141345 marked the issue as duplicate of #584 |
141345 marked the issue as duplicate of #522 |
alex-ppg marked the issue as not a duplicate |
alex-ppg marked the issue as duplicate of #877 |
alex-ppg marked the issue as duplicate of #303 |
alex-ppg marked the issue as unsatisfactory: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-303
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#L18
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L454-L457
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenCore.sol#L320-L325
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/RandomizerNXT.sol#L45-L47
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/RandomizerRNG.sol#L59-L64
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/RandomizerVRF.sol#L92-L97
Vulnerability details
Impact
In the NextGenAdmins contract there are global admins registered by the ownable function
registerCollectionAdmin
When a new global administrator registers, it can call multiple functions from multiple contracts, the most critical function who it's present all contracts except in auctionDemo contract it's the
updateAdminContract
With this function, the global admin or whoever is given the power to call this function has the ability to change the admin contract, thus taking full control of these contracts(all contracts except auctionDemo) and take the ownership of the contracts
Proof of Concept
This PoC shows how the global admin can be made from the NextGenMinterContract contract by setting the
adminsContract
variable with a contract controlled by it, the same PoC is applicable to the rest of the contractsTools Used
Manual review
Recommended Mitigation Steps
Remove the global admins(
adminPermissions
and all his behavior), this would make the admin have permission over the functions that theowner
assigns to them through functionsregisterFunctionAdmin
,registerBatchFunctionAdmin
andregisterCollectionAdmin
:File: smart-contracts/NextGenAdmins.sol
File: smart-contracts/INextGenAdmins.sol
File: smart-contracts/AuctionDemo.sol
File: smart-contracts/MinterContract.sol
File: smart-contracts/NextGenCore.sol
File: smart-contracts/RandomizerNXT.sol
File: smart-contracts/RandomizerRNG.sol
File: smart-contracts/RandomizerVRF.sol
Assessed type
Access Control
The text was updated successfully, but these errors were encountered: