58198 sc low broken two step admin transfer pattern

Submitted on Oct 31st 2025 at 10:23:39 UTC by @teoslaf1 for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #58198

  • Report Type: Smart Contract

  • Report severity: Low

  • Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/AlchemistCurator.sol

  • Impacts:

    • Permanent freezing of funds

    • incorrect access control

Description

Description

The acceptAdminOwnership() function has incorrect access control that prevents the pending admin from accepting ownership while allowing the current admin to complete the transfer unilaterally. This completely defeats the purpose of the two-step transfer pattern, which requires the new admin to explicitly accept ownership to prevent accidental transfers to incorrect or inaccessible addresses.

The function uses onlyAdmin modifier, which checks msg.sender == admin (the current admin), when it should check msg.sender == pendingAdmin (the new pending admin).

Vulnerable Code

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

Impact

  • Pending admin cannot accept ownership: The intended recipient is blocked from accepting the transfer

  • Current admin retains full control: Can complete the transfer unilaterally without the new admin's consent or confirmation

  • Risk of permanent loss: If admin transfers to a wrong/inaccessible address, they can still complete it, permanently losing control

  • Defeats security pattern: The two-step transfer becomes a one-step transfer with extra steps

  • No validation of new admin: The new address never proves it can interact with the contract

Recommendation

Change the access control to require the pending admin (not current admin) to accept:

Proof of Concept

Proof of Concept

Add this to AlchemistCurator.t.sol

Was this helpful?