Alchemistcurator two step ownership transfer mis implemented
The acceptAdminOwnership function in the AlchemistCurator contract is guarded by the onlyAdmin modifier rather than checking that the caller is the pending admin. This defeats the purpose of the two-step transfer, since the current admin can complete the handover to an address that cannot interact with the contract, leaving it stuck.
- Disclosed after under an hour
58419 sc low alchemistcurator two step ownership transfer mis implemented
Submitted on Nov 2nd 2025 at 07:13:54 UTC by @Y4nhu1 for Audit Comp | Alchemix V3
- Report ID: #58419
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi\\_audit/src/AlchemistCurator.sol
- Impacts:
Description
Brief/Intro
Using only the onlyAdmin modifier in a two-step ownership transfer could result in setting the admin to an unavailable account.
Vulnerability Details
The acceptAdminOwnership function in the AlchemistCurator contract prevents pending admin acceptance by using the modifier onlyAdmin instead of ensuring that msg.sender matches the pendingAdmin.
function acceptAdminOwnership() external onlyAdmin {
admin = pendingAdmin;
pendingAdmin = address(0);
emit AdminChanged(admin);
}
Impact Details
The advantage of the two-step ownership transfer is that it can prevent the owner from being set to an incorrect account. However, if only the admin is allowed to call function acceptAdminOwnership, this advantage is lost, as the admin could be set to an unavailable address that can’t interact with this contract anymore.
References
Proof of Concept
Proof of Concept
forge test --mt "testAcceptAdminOwnershipAccessControl" -vvv
diff --git a/src/test/AlchemistCurator.t.sol b/src/test/AlchemistCurator.t.sol
index a21c4c4..bb92c2a 100644
--- a/src/test/AlchemistCurator.t.sol
+++ b/src/test/AlchemistCurator.t.sol
@@ -191,6 +191,21 @@ contract AlchemistCuratorTest is Test {
mytCuratorProxy.acceptAdminOwnership();
}
+ function testAcceptAdminOwnershipAccessControl() public {
+ address pendingAdmin = makeAddr("pendingAdmin");
+
+ vm.prank(admin);
+ mytCuratorProxy.transferAdminOwnerShip(pendingAdmin);
+
+ // pending admin can't accept admin ownership
+ vm.prank(pendingAdmin);
+ vm.expectRevert(abi.encode("PD"));
+ mytCuratorProxy.acceptAdminOwnership();
+
+ vm.prank(admin);
+ mytCuratorProxy.acceptAdminOwnership();
+ }
+
function testSetStrategyUnauthorizedAccessRevert() public {
vm.expectRevert(abi.encode("PD"));
mytCuratorProxy.setStrategy(address(mytStrategy), address(vault));
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
The acceptAdminOwnership function uses the onlyAdmin modifier instead of verifying that the caller equals pendingAdmin.
Impact
The admin role could be set to an address that cannot interact with the contract, permanently locking administration.
What the attacker needed
Caller holds the admin role
The fix
The accept function should require that the caller is the pending admin rather than the current admin.
How it was found
- The current admin calls transferAdminOwnerShip to nominate a pending admin.
- The nominated pending admin tries to call acceptAdminOwnership and the call reverts.
- The current admin calls acceptAdminOwnership and the transfer completes.
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 two-step ownership transfer is meant to be safer: the current owner nominates a new owner, and only that nominated person can accept. Here the accept function checks that the caller is the current admin, not the nominated one, so the wrong person is allowed to finish the transfer. That can lock the contract's admin role to an address nobody controls.
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.