Skip to content
Access control Audit finding Beginner

Pending admin cannot accept ownership

The acceptAdminOwnership function in AlchemistCurator is restricted to the current admin instead of the pending admin, so the pending admin cannot accept ownership. The current admin can therefore unilaterally transfer control to any address, including one that cannot act, risking permanent loss of contract control.

acnologiac Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

58520 sc low pending admin cannot accept ownership

Submitted on Nov 2nd 2025 at 23:57:48 UTC by @acnologiac for Audit Comp | Alchemix V3

Description

Brief/Intro

The acceptAdminOwnership() function in AlchemistCurator is implemented incorrectly, allowing the current admin to complete ownership transfers . This breaks the intended security of the two-step ownership transfer pattern, risking permanent loss of contract control, governance paralysis, and potential exploitation.

Vulnerability Details

The AlchemistCurator contract implements a two-step admin ownership transfer mechanism intended to provide an extra layer of security by requiring the pending admin to actively accept ownership. The acceptAdminOwnership function uses the onlyAdmin modifier, which restricts execution to the current admin. However, in a proper two-step transfer pattern, the pending admin (the new admin receiving ownership) should be the one calling this function to accept ownership. This breaks the security model, as the new admin never has to prove control over their address or actively consent to taking ownership. As a result, the current admin can transfer control to any address, including incorrect or non-functional addresses, without any confirmation from the intended recipient.

The two-step transfer pattern exists to ensure the new admin must prove they control the address by signing a transaction and the new admin must actively accept, showing awareness of the responsibility. The broken implementation allows the current admin to unilaterally transfer ownership without any of these safeguards.

Impact Details

This vulnerability introduces severe risks that can make the contract become permanently non-functional for all governance operations as the curator cannot add or remove strategies, transfer admin again or set operators.

References

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

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

Proof of Concept

Proof of Concept

The test should be ran in the AlchemistCurator.t.sol found in the test folder using this command; forge test --match-test testPendingAdminCannotAccept -vv

Solidity
function testPendingAdminCannotAccept() public {
    address newAdmin = address(0x6666666666666666666666666666666666666666);

    // Admin nominates newAdmin
    vm.startPrank(admin);
    mytCuratorProxy.transferAdminOwnerShip(newAdmin);
    vm.stopPrank();

    // pending (newAdmin) attempts to accept — should revert because onlyAdmin blocks it
    vm.startPrank(newAdmin);
    vm.expectRevert(abi.encode("PD")); // Permission Denied from onlyAdmin
    mytCuratorProxy.acceptAdminOwnership();
    vm.stopPrank();

    // Ensure nothing changed: admin still the original (read storage slot 0)
    address currentAdmin = address(uint160(uint256(vm.load(
        address(mytCuratorProxy),
        bytes32(uint256(0))
    ))));
    assertEq(currentAdmin, admin, "admin unexpectedly changed");
    // pendingAdmin still set
    assertEq(mytCuratorProxy.pendingAdmin(), newAdmin, "pendingAdmin unexpectedly cleared");
}

The original report as published on Immunefi, by acnologiac. 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

Impact

The contract could become permanently non-functional for governance operations because the curator cannot add or remove strategies, transfer admin again, or set operators.

What the attacker needed

Current admin nominates a new admin; new admin address cannot call accept

The fix

The acceptAdminOwnership function should be callable by the pending admin, not the current admin, so the recipient must actively accept.

How it was found

  1. The current admin nominates a new admin address.
  2. The pending admin tries to accept ownership.
  3. The call reverts because only the current admin is allowed.
  4. The admin and pending admin values remain unchanged.

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 contract has an admin who can change important settings. A two-step transfer is meant to make sure the new admin really wants the role and controls the address. Here the wrong person is allowed to confirm the transfer, so the old admin can hand control to an address that can never accept it, and the contract gets stuck.

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 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.