Pending admin cannot accept ownership in alchemistcurator sol
The contract's two-step admin transfer is broken because the function meant for the incoming admin to accept ownership is guarded by a modifier that only lets the current admin call it. As a result, the pending admin can never complete the handover, so ownership cannot be transferred through the intended flow.
- Disclosed after under an hour
58714 sc low pending admin cannot accept ownership in alchemistcurator sol
Submitted on Nov 4th 2025 at 08:17:45 UTC by @Bx4 for Audit Comp | Alchemix V3
- Report ID: #58714
- 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
Brief/Intro
In the AlchemistCurator contract after Admin has transferred Ownership to new Admin the new pendingAdmin is not able to accept ownership because of the onlyAdmin modifier on acceptAdminOwnership
Vulnerability Details
Looking at AlchemistCurator transfer owner functionality, it uses the two-step logic which means, the current admin transfers the ownership to the new admin and then the new pending admin has to accept admin privileges by calling acceptAdminOwnership to accept ownership.
But here is the case that whenever the new pending owner tries to call acceptAdminOwnership it always revert because of the onlyAdmin modifier present on the acceptAdminOwnership
function acceptAdminOwnership() external onlyAdmin {
modifier onlyAdmin() {
require(msg.sender == admin, "PD");
_;
}
This modifier allows only admins to call acceptAdminOwnership and as pendingAdmin is not an admin it will revert.
In view of this, The implemented two-step transfer Ownership logic is flawed, and breaks the main pillars of the two-step transfer logic.
Impact Details
This contract fails to honour the promised return of allowing the new pending admin to accept ownership when pendingOwner invokes acceptAdminOwnership .
References
AlchemistCurator::transferAdminOwnerShip
AlchemistCurator::acceptAdminOwnership
Proof of Concept
Proof of Concept
Please add this test into src/test/AlchemistCurator.t.sol
function testAdminChangeVuln() public{
// Current admin transfers ownership to new admin
vm.startPrank(admin);
address newAdmin = address(0xabc);
mytCuratorProxy.transferAdminOwnerShip(newAdmin);
vm.stopPrank();
// new Admin accepting new ownership privileges
vm.prank(newAdmin);
vm.expectRevert(); // This will revert because of the onlyAdmin modifier which is expecting the current admin to call rather than pending
mytCuratorProxy.acceptAdminOwnership();
}
We can observe that the test passes and this is due to the revert that happens whenever the new pendingAdmin tries to accept Admin ownership.
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 acceptAdminOwnership function is protected by the onlyAdmin modifier, which requires the caller to already be the admin, contradicting the purpose of a pending-admin acceptance step.
Impact
The two-step ownership transfer cannot be completed, so the contract fails to deliver the promised handover of admin rights, though no funds are lost.
What the attacker needed
Current admin initiates transfer; pending admin calls accept
The fix
The accept function should be callable by the pending admin (for example by checking the caller against pendingAdmin) rather than by the current admin.
How it was found
- The current admin calls transferAdminOwnerShip with a new admin address.
- The new pending admin calls acceptAdminOwnership.
- The call reverts because the onlyAdmin modifier rejects the pending 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.
Some contracts change owners in two steps: the current owner nominates a new one, and the nominee must then accept. Here the accept function checks that the caller is already the owner, which the nominee is not, so the accept call always fails. The contract therefore cannot hand over control the way it promises.
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.