Inconsistent admin management implementation in alchemistcurator sol
The AlchemistCurator contract inherits a one-step setAdmin function from PermissionedProxy while also adding its own two-step admin transfer flow, so two competing mechanisms modify the same admin variable. An admin could believe a two-step handover is enforced and still have the admin replaced instantly through the inherited function.
Originally disclosed on Immunefi
- Disclosed after under an hour
58579 sc low inconsistent admin management implementation in alchemistcurator sol
Submitted on Nov 3rd 2025 at 10:35:51 UTC by @Ratt13snak3 for Audit Comp | Alchemix V3
- Report ID: #58579
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi\\_audit/src/AlchemistCurator.sol
- Impacts:
- Permanent freezing of funds
- Contract fails to deliver promised returns, but doesn't lose value
Description
Description
The AlchemistCurator contract inherits from PermissionedProxy, which already defines a one-step admin update function:
function setAdmin(address _admin) external onlyAdmin {
require(_admin != address(0), "zero");
admin = _admin;
emit AdminUpdated(_admin);
}
However, AlchemistCurator adds an entirely new two-step admin transfer mechanism using:
function transferAdminOwnerShip(address _newAdmin) external onlyAdmin {
pendingAdmin = _newAdmin;
}
function acceptAdminOwnership() external onlyAdmin {
admin = pendingAdmin;
pendingAdmin = address(0);
emit AdminChanged(admin);
}
This introduces two competing methods for admin management: a one-step (setAdmin) and a two-step (transferAdminOwnerShip + acceptAdminOwnership). Both modify the same admin variable and are callable by the DAO (the admin), which can cause confusion, governance errors, or unintended privilege transfers if both flows are used inconsistently.
Impact : Administrative confusion and potential misconfiguration
- DAO (admin) may mistakenly assume a two-step admin handover is enforced, when in fact the inherited
setAdmin()can instantly replace the admin.
Recommendation
If the intent is to use a two-step transfer model, remove or disable the setAdmin() function from PermissionedProxy. Alternatively, standardize on the single-step setAdmin() and delete transferAdminOwnerShip() and acceptAdminOwnership() from the curator.
Proof of Concept
Proof of Concept
insert the test function below into AlchemistCurator.t.sol
function testInconsistentAdminManagement() public {
// Confirm current admin is the DAO
assertEq(mytCuratorProxy.admin(), admin);
// Admin sets a pendingAdmin using the curator's two-step system
vm.prank(admin);
mytCuratorProxy.transferAdminOwnerShip(address(0x5555555555555555555555555555555555555555));
// At this point, pendingAdmin should be set but not yet effective
assertEq(mytCuratorProxy.pendingAdmin(), address(0x5555555555555555555555555555555555555555));
assertEq(mytCuratorProxy.admin(), admin);
// However, the same admin can instantly override via inherited PermissionedProxy.setAdmin()
vm.prank(admin);
mytCuratorProxy.setAdmin(address(0x9999999999999999999999999999999999999999));
// The one-step function bypasses the two-step safety pattern
assertEq(mytCuratorProxy.admin(), address(0x9999999999999999999999999999999999999999));
emit log("Admin changed instantly via inherited setAdmin(), bypassing pendingAdmin flow.");
}
then run the test:
forge test --mt testInconsistentAdminManagement
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the contract inherits a single-step admin setter from its parent while also defining a separate two-step transfer flow, leaving two paths that write the same admin variable.
Impact
The DAO could assume a two-step handover is enforced while the inherited function can replace the admin instantly, risking governance errors or unintended privilege transfers; the report rates this as low severity and does not show funds actually being lost.
What the attacker needed
Admin (DAO) privileges; none for an outside attacker
The fix
Either remove or disable the inherited setAdmin so only the two-step flow remains, or standardise on the single-step setter and delete the two-step functions.
How it was found
- Confirm the current admin is the DAO
- As admin, start the two-step transfer by setting a pending admin
- Observe the pending admin is recorded but the admin is unchanged
- As the same admin, call the inherited one-step setAdmin with a different address
- Observe the admin is replaced instantly, bypassing the pending flow
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract is code on a blockchain, and an admin is the account allowed to change important settings. This contract offers two different ways to hand over that admin role: one that takes effect immediately and one that needs a second confirmation step. Having both means someone might think the safer two-step process is required when the instant one still works.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.