Skip to content
Access control Audit finding Beginner

Broken admin rotation in acceptAdminOwnership() causes permanent governance lockout

The acceptAdminOwnership() function in the AlchemistCurator contract is protected by the onlyAdmin modifier, so only the current admin can call it, not the pendingAdmin. This prevents the pendingAdmin from ever accepting ownership, breaking the two-step admin transfer and potentially locking governance if the current admin loses access.

al0x23 Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

57975 sc low broken admin rotation in acceptadminownership causes permanent governance lockout

Submitted on Oct 29th 2025 at 18:33:46 UTC by @al0x23 for Audit Comp | Alchemix V3

Description

Brief/Intro

The acceptAdminOwnership() function in the AlchemistCurator contract uses the onlyAdmin modifier, which restricts its execution to the current admin. As a result, the pendingAdmin — who is supposed to accept ownership — cannot complete the handover. This design flaw prevents any future admin rotation and can permanently lock governance operations if the current admin loses access to their key. Because the curator contract is itself timelocked and controls configuration of the main VaultV2 contract, this bug introduces a long-term liveness failure in governance.

Vulnerability Details

The AlchemistCurator implements a two-step admin transfer mechanism:

address public admin; address public pendingAdmin;

modifier onlyAdmin() { require(msg.sender == admin, "PD"); _; }

function transferAdminOwnership(address newAdmin) external onlyAdmin { pendingAdmin = newAdmin; }

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

The onlyAdmin modifier is applied to both functions. This means:

Only the current admin can call both transferAdminOwnership() and acceptAdminOwnership().

The intended pendingAdmin can never call acceptAdminOwnership() to finalize the role transfer.

Expected behavior:

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

Actual behavior: The current admin must call acceptAdminOwnership() to complete the transfer, which defeats the purpose of having a two-step ownership mechanism. If the current admin loses access or is offboarded, the protocol cannot complete the rotation, and the admin role remains forever locked.

Timelock Considerations

The AlchemistCurator interacts with the timelocked functions in the main VaultV2 contract. Because curator actions (like setting caps, allocators, and fees) are executed via timelocks, a working admin key is required to submit and approve transactions over time.

If the admin is lost or the transfer is stuck:

No new timelocked operations can be initiated.

No governance actions (e.g., adjusting caps, adding adapters, or modifying fees) can be executed.

Critical updates requiring curator/admin actions become permanently unavailable.

Even though the VaultV2.owner could technically deploy a new curator and assign it via setCurator, this is a heavy manual recovery that breaks timelock continuity and governance integrity.

Impact Details

Impact:

Governance and curator operations are permanently frozen once the current admin key is not available, and the changeAdmin intended functionality is 100% broken in any scenario. No new admin can take control, even though the pendingAdmin variable is correctly set. The bug doesn’t cause loss of funds, but causes governance paralysis, blocking timelocked configuration updates (e.g., cap adjustments, gate settings, or allocator role changes).

Proof of Concept

Proof of Concept

paste this in src/test/AlchemistCurator.t.sol

Solidity

 function test_PoC_changeAdmin() external {
        address newAdmin = makeAddr("newAdmin");
        vm.prank(admin);
        mytCuratorProxy.transferAdminOwnerShip(newAdmin);
        vm.prank(newAdmin);
        vm.expectRevert(bytes("PD"));
        mytCuratorProxy.acceptAdminOwnership();
    }

The original report as published on Immunefi, by al0x23. 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 checking that the caller is the pendingAdmin.

Impact

Governance and curator operations could be permanently frozen if the current admin key is unavailable, and the admin rotation functionality is completely broken in any scenario.

What the attacker needed

Current admin key lost or unavailable

The fix

The acceptAdminOwnership() function should be changed to require that the caller is the pendingAdmin, not the current admin.

How it was found

  1. The current admin calls transferAdminOwnership() to set a new pendingAdmin.
  2. The pendingAdmin calls acceptAdminOwnership() to finalise the transfer.
  3. The call reverts with 'PD' because the pendingAdmin 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.

In smart contracts, an admin is a special account that can change important settings. A two-step transfer lets the current admin nominate a new admin, who must then accept. Here, the accept function is wrongly restricted to the current admin, so the nominated person can never accept, and the transfer never completes.

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 al0x23

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.