Skip to content
Access control Audit finding Beginner

Alchemistcurator 2 step ownership transfer is implemented incorrectly

The AlchemistCurator contract's two-step ownership transfer is broken because the function to accept ownership is restricted to the current admin, not the pending admin. This means the pending admin can never accept ownership, so the process is effectively single-step and error-prone.

Oxdeadmanwalking Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

58555 sc low alchemistcurator 2 step ownership transfer is implemented incorrectly

Submitted on Nov 3rd 2025 at 07:54:24 UTC by @Oxdeadmanwalking for Audit Comp | Alchemix V3

Description

Brief/Intro

AlchemistCurator implements a 2 step ownership transfer system that allows the current admin to propose a pendingAdmin which can later accept the ownership of the contract by calling acceptAdminOwnership(). This function however is only callable by the current admin so the pending admin will never be able to accept the ownership, leaving room for errors.

Vulnerability Details

AlchemistCurator 2-step ownership transfer system is similar to Ownable2Step by Openzeppelin which aims to minimize the room for error when performing ownership transfering operations.

While other contracts in the system implement the mechanism correctly, in AlchemistCurator , acceptAdminOwnership is only callable by the current admin and not the pending admin breaking the intended design and making the process as error prone as a single step ownership transfer.

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

    // @audit this can never be executed by the pending admin because it is currently not the admin
    function acceptAdminOwnership() external onlyAdmin {
        admin = pendingAdmin;
        pendingAdmin = address(0);
        emit AdminChanged(admin);
    }

acceptAdminOwnership is gated by an onlyAdmin modifier. The only address that can call acceptAdminOwnership is thus, the current admin

Impact Details

The issue essentially breaks the 2-step ownership transfer system leaving the process vulnerable to errors. If the pendingAdmin is set to a wrong address and acceptAdminOwnership is executed then the whole MYT management can break.

References

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

Proof of Concept

Proof of Concept

  1. Add this test to AlchemistCurator.t.sol. Import console at the top of the file
import "forge-std/console.sol";
    function test_poc_wrong_2_step_ownership_transfer() public {
        address newAdmin = makeAddr("newAdmin");

        vm.startPrank(admin);
        console.log("Transferring ownership to new admin: ", newAdmin);
        mytCuratorProxy.transferAdminOwnerShip(newAdmin);
        vm.stopPrank();

        console.log("Accepting ownership by new admin: ", newAdmin, "expecting revert...");
        vm.startPrank(newAdmin);
        vm.expectRevert(abi.encode("PD"));
        mytCuratorProxy.acceptAdminOwnership();
        vm.stopPrank();
    }
  1. Observe the logs
[PASS] test_poc_wrong_2_step_ownership_transfer() (gas: 52202)
Logs:
  Transferring ownership to new admin:  0x67ED0Ac45b537A79406E01656d90659325455585
  Accepting ownership by new admin:  0x67ED0Ac45b537A79406E01656d90659325455585 expecting revert...

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

Likely the acceptAdminOwnership function incorrectly uses the onlyAdmin modifier instead of allowing the pendingAdmin to call it.

Impact

The two-step ownership transfer is broken, leaving the process as error-prone as a single-step transfer; if a wrong address is set and accepted, management could break.

What the attacker needed

Current admin sets a pending admin

The fix

The acceptAdminOwnership function should be callable by the pendingAdmin, not the current admin.

How it was found

  1. Current admin calls transferAdminOwnerShip with a new address.
  2. New address attempts to call acceptAdminOwnership.
  3. The call reverts because the new address is not the current admin.

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 lets the current owner nominate a new owner, who must then actively accept. Here, the accept function can only be called by the current owner, so the nominated person can never take over. This defeats the safety check and could lead to mistakes if the wrong address is nominated.

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 Oxdeadmanwalking

View all

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