Skip to content
Access control Audit finding Beginner

Incorrect 2 step ownership in alchemistcurator

The two-step admin ownership transfer in AlchemistCurator lets the current admin accept ownership on behalf of the pending admin, so the pending admin never has to confirm. An admin could therefore transfer ownership to an address that cannot act, leaving the curator contracts unusable.

JoeMama Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

57123 sc low incorrect 2 step ownership in alchemistcurator

Submitted on Oct 23rd 2025 at 17:21:45 UTC by @JoeMama for Audit Comp | Alchemix V3

Description

Brief/Intro

The current implementation of acceptAdminOwnership() allows any current admin to accept ownership on behalf of the pendingAdmin, instead of requiring the pending admin to explicitly accept it.

This defeats the purpose of the two-step ownership transfer, which is meant to prevent wrong address ownership transfers. The acceptance should come only from the pending admin.

Vulnerability Details

    function transferAdminOwnerShip(address _newAdmin) external onlyAdmin {
        pendingAdmin = _newAdmin;
    }

    function acceptAdminOwnership() external onlyAdmin {
        admin = pendingAdmin;
        pendingAdmin = address(0);
        emit AdminChanged(admin);
    }

Impact Details

The acceptAdminOwnership function is meant to verify that the new admin address actually exists. However, since the new admin must now call acceptAdminOwnership to complete the transfer, there’s a risk that the specified address doesn’t exist or isn’t accessible. If ownership is transferred to such an address, the curator contracts would become unusable because no one would be able to operate them.

Recommendation:

Update the function to require that only the pending admin can call it:

function transferAdminOwnerShip(address _newAdmin) external onlyAdmin {
      pendingAdmin = _newAdmin;
 }

function acceptAdminOwnership() external { 
      require(pendingAdmin == msg.sender); 
      admin = pendingAdmin;
      pendingAdmin = address(0);
      emit AdminChanged(admin);
}

Proof of Concept

Proof of Concept

Please add these 2 test to the existing AlchemistCuratorTest.

    function testTransferOwnershipPendingCannotAccept() public {
        address pendingAdmin = makeAddr("pendingAmin");

        vm.prank(admin);
        mytCuratorProxy.transferAdminOwnerShip(pendingAdmin);

        vm.expectRevert(abi.encode("PD"));
        vm.prank(pendingAdmin);
        mytCuratorProxy.acceptAdminOwnership(); // pending admin should be able to call this but it reverts.
    }

    function testTransferOwnershipToNonExistingAddress() public {
   
        vm.prank(admin);
        mytCuratorProxy.transferAdminOwnerShip(address(0));

        vm.prank(admin);
        // the owner of the address is now address 0 meaning the contract cannot be used anymore.
        mytCuratorProxy.acceptAdminOwnership(); 
    }

The original report as published on Immunefi, by JoeMama. 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 is guarded by onlyAdmin instead of checking that the caller is the pending admin.

Impact

Ownership could be moved to an address that cannot operate the contract, which would make the curator contracts unusable, though no funds are lost.

What the attacker needed

Caller is the current admin

The fix

The accept function should require that the caller is the pending admin, rather than any current admin.

How it was found

  1. The current admin calls transferAdminOwnerShip with a new address, setting pendingAdmin.
  2. The current admin calls acceptAdminOwnership, which succeeds because the caller is still an admin.
  3. The admin address becomes the pending address, even if that address cannot act.

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 stop someone sending control of a contract to a wrong or dead address by mistake. The first step names a new owner, and the second step should only work when that new owner confirms. Here the old owner can do the confirming step too, so the safety check does nothing.

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 JoeMama

View all

6 more disclosed reports, 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.