57127 sc low pending admin should call the function instead of admin

Submitted on Oct 23rd 2025 at 17:42:45 UTC by @SAAJ for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #57127

  • Report Type: Smart Contract

  • Report severity: Low

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

  • Impacts:

    • Contract fails to deliver promised returns, but doesn't lose value

Description

Summary

pendingAdmin will not be able to call acceptAdminOwnership due to onlyAdmin modifier.

Vulnerability Details

AlchemistCurator function allows transferring of contract admin ownership through function transferAdminOwnerShip, the process is however a two step process. In the first step the admin call function with _newAdmin to set as pendingAdmin.

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

The second step involves accepting of ownership by the pendingAdmin which however restrict the call by pendingAdmin as it is callable only by admin due to onlyAdmin modifier.

This enforces the authority to present admin to call both function and does not allow the pendingAdmin to call the acceptAdminOwnership function.

Code Reference

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

Recommendations

The recommendation is made to remove the onlyAdmin modifier and implementing check that allows pendingAdmin to call the acceptAdminOwnership function.

Proof of Concept

Proof of Concept

Here is a test demonstrating the issue of restriction made making pendingAdmin to call the acceptAdminOwnership function.

First we call the function transferAdminOwnerShip with admin making the call the transaction process normally, but when we try to call the acceptAdminOwnershipfunction with thependingAdmin``.

The result clearly shows the testAcceptAdminOwnership revert with reason PD showing pendingAdmin unable to call the function acceptAdminOwnership of contract AlchemistCurator.

Was this helpful?