AcceptAdminOwnership() only allows the current admin to finalise transfers
The acceptAdminOwnership function is restricted to the current admin, so the nominated pending admin cannot finalise an admin handover. If the outgoing admin becomes unavailable after scheduling the transfer, the contract stays under the old admin indefinitely.
- Disclosed after under an hour
57394 sc low acceptadminownership only allows the current admin to finalise transfers
#57394 [SC-Low] `acceptAdminOwnership()` only allows the current admin to finalise transfers
Submitted on Oct 25th 2025 at 19:48:50 UTC by @pxng0lin for Audit Comp | Alchemix V3
- Report ID: #57394
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi\\_audit/src/AlchemistCurator.sol
- Impacts:
Description
Bug Description
AlchemistCurator.acceptAdminOwnership() @src/AlchemistCurator.sol#31-34 is guarded by onlyAdmin. After transferAdminOwnerShip() sets pendingAdmin, the same admin must also call acceptAdminOwnership() because any other address fails the modifier check. A nominated pendingAdmin cannot execute the function, so the contract relies on the outgoing admin to complete both steps of the handover. If that account becomes unavailable, the transition cannot finish.
Impact
- Admin handover dependency: The nominated address cannot finalise control; only the existing admin can call the second step.
- Operational risk: If the current admin loses access after scheduling a transfer, the contract remains under the old admin indefinitely.
Risk Breakdown
- Privilege required: Current
admin. - Likelihood: Medium
Recommendation
Allow the nominated party to accept by checking msg.sender == pendingAdmin (e.g., an onlyPendingAdmin modifier) before updating admin.
References
- Handover initiation:
transferAdminOwnerShip()@src/AlchemistCurator.sol#26-29. - Acceptance function:
acceptAdminOwnership()@src/AlchemistCurator.sol#31-34.
Proof of Concept
Proof of Concept
- Existing ownership: The contract is deployed with
admin = addrA. - Planned handover:
addrAinitiates the transition by callingtransferAdminOwnerShip(addrB). Storage now recordspendingAdmin = addrB. - New admin tries to accept: Acting as
addrB, we callacceptAdminOwnership(). The call reverts withUnauthorized("PD")becauseonlyAdminaccepts only the currentadmin. - Original admin finalises instead:
addrArepeats the call and succeeds. The function assignsadmin = addrBand clearspendingAdmin, even thoughaddrBnever interacted. - Failure mode: If
addrAdisappears between steps 2 and 4—lost keys, compromised wallet—the takeover cannot complete. Governance stays bound toaddrA.
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
The acceptance function is guarded by the current-admin check instead of checking that the caller is the nominated pending admin.
Impact
If the current admin loses access after scheduling a transfer, the contract could remain under the old admin indefinitely.
What the attacker needed
Current admin initiates transfer; current admin becomes unavailable
The fix
The acceptance function should check that the caller is the pending admin before updating the admin.
How it was found
- Deploy the contract with an admin address.
- The current admin calls the transfer function to nominate a new admin.
- The nominated address calls the accept function and the call reverts.
- The original admin calls the accept function and it succeeds.
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 smart contract has an admin account that controls it. The contract lets the current admin nominate a replacement, but the second step of the handover can only be done by the current admin, not by the replacement. So if the current admin loses access to their account, the replacement can never take over.
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.