Skip to content
Access control Audit finding Beginner

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.

Y4nhu1 Follow

Originally disclosed on Immunefi

  • 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

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.

Solidity
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

https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/AlchemistCurator.sol#L31

Proof of Concept

Proof of Concept

forge test --mt "testAcceptAdminOwnershipAccessControl" -vvv

Diff
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));

The original report as published on Immunefi, by Y4nhu1. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

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

  1. The current admin calls transferAdminOwnerShip to nominate a pending admin.
  2. The nominated pending admin tries to call acceptAdminOwnership and the call reverts.
  3. 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.

More by Y4nhu1

View all

1 more disclosed report, best first.

More from Alchemix V3

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.