Pending admin cannot accept ownership
The acceptAdminOwnership function is protected by the onlyAdmin modifier, so the pending admin cannot call it to become the new admin. This prevents the ownership transfer from ever completing, locking the contract's admin role.
- Disclosed after under an hour
56332 sc low pending admin cannot accept ownership
Submitted on Oct 14th 2025 at 16:51:59 UTC by @PotEater for Audit Comp | Alchemix V3
- Report ID: #56332
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi\\_audit/src/AlchemistCurator.sol
- Impacts:
Description
Brief/Intro
The function acceptAdminOwnership is guarded with the onlyAdmin modifier.
This is a mistake, because the pending admin cannot accept ownership, because he is not yet an admin when claiming the ownership.
Vulnerability Details
The function transferAdminOwnerShip sets the pendingAdmin address. Then, the pendingAdmin is expected to call acceptAdminOwnership and accept his ownership. However, this is not possible, because the pending admin is not yet an admin.
Code snippet:
// ===== Admin Management =====
function transferAdminOwnerShip(address _newAdmin) external onlyAdmin {
pendingAdmin = _newAdmin;
}
function acceptAdminOwnership() external onlyAdmin {
admin = pendingAdmin;
pendingAdmin = address(0);
emit AdminChanged(admin);
}
Impact Details
The impact is that the pending admin cannot accept the ownership.
This is a Denial of Service.
References
Proof of Concept
Proof of Concept
This PoC demonstrates how a pending admin tries to call acceptAdminOwnership but fails due to the onlyAdmin modifier:
Add this function in the AlchemistCurator.t.sol test file:
function test_PoC() external {
address pendingAdminn = makeAddr("pendingadminn");
vm.prank(admin);
mytCuratorProxy.transferAdminOwnerShip(pendingAdminn);
vm.expectRevert();
vm.prank(pendingAdminn);
mytCuratorProxy.acceptAdminOwnership();
}
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 incorrectly uses the onlyAdmin modifier, which checks the current admin instead of allowing the pending admin to call it.
Impact
The pending admin cannot accept ownership, causing a denial of service for the admin transfer process.
What the attacker needed
Current admin initiates transfer; pending admin attempts to accept
The fix
The acceptAdminOwnership function should be callable by the pending admin, for example by checking that the caller is pendingAdmin instead of using onlyAdmin.
How it was found
- The current admin calls transferAdminOwnerShip to set a pending admin address.
- The pending admin calls acceptAdminOwnership.
- The call reverts because the pending admin is not yet an 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.
In a smart contract, an admin is a special user who can perform restricted actions. The contract lets the current admin nominate a new admin, but the new admin must call a function to accept. Because that function only allows the current admin to call it, the nominated person can never accept, so the admin role gets stuck.
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.