Pending admin cannot accept ownership in alchemistcurator
The acceptAdminOwnership function in AlchemistCurator is protected by the onlyAdmin modifier, so the pending admin cannot call it to accept ownership. This breaks the intended ownership transfer process, though no funds are at risk.
- Disclosed after under an hour
56893 sc low pending admin cannot accept ownership in alchemistcurator
Submitted on Oct 21st 2025 at 15:15:57 UTC by @liae for Audit Comp | Alchemix V3
- Report ID: #56893
- 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
Pending admin cannot accept ownership in AlchemistCurator due to use of onlyAdmin modifier in acceptAdminOwnership() function.
Vulnerability Details
AlchemistCurator.sol:acceptAdminOwnership() is intended to allow the pendingAdmin to accept ownership, but this is not possible due to the use of the onlyAdmin modifier:
function acceptAdminOwnership() external onlyAdmin {
...
}
Impact Details
acceptAdminOwnership() function does not work as intended, but there is no risk of fund loss.
References
Proof of Concept
Proof of Concept
Add this test case to src/test/AlchemistCurator.t.sol:
function testAcceptOwnershipFailByPendingAdmin() public {
address pendingAdmin = address(0x104);
vm.startPrank(admin);
mytCuratorProxy.transferAdminOwnerShip(pendingAdmin);
vm.stopPrank();
vm.startPrank(pendingAdmin);
//@audit @note pendingAdmin can not accept ownership
vm.expectRevert(abi.encode("PD"));
mytCuratorProxy.acceptAdminOwnership();
vm.stopPrank();
}
Run it with command:
forge test --mt testAcceptOwnershipFailByPendingAdmin
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 uses the onlyAdmin modifier, which restricts it to the current admin instead of the pending admin.
Impact
The ownership transfer cannot be completed, so the contract fails to deliver the promised admin handover, but there is no risk of fund loss.
What the attacker needed
Current admin initiates ownership transfer; pending admin attempts to accept
How it was found
- The current admin calls transferAdminOwnerShip to set a pending admin.
- The pending admin calls acceptAdminOwnership.
- The call reverts with error 'PD' because the onlyAdmin modifier blocks it.
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, ownership transfer often works in two steps: the current owner nominates a new admin, and that nominee must accept. Here, the acceptance function was mistakenly restricted to the current admin, so the nominee can never complete the transfer. This means the contract's admin role cannot be handed over as designed.
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.