Skip to content
Access control Audit finding Beginner

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.

pxng0lin Follow

Originally disclosed on Immunefi

  • 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

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

  1. Existing ownership: The contract is deployed with admin = addrA.
  2. Planned handover: addrA initiates the transition by calling transferAdminOwnerShip(addrB). Storage now records pendingAdmin = addrB.
  3. New admin tries to accept: Acting as addrB, we call acceptAdminOwnership(). The call reverts with Unauthorized("PD") because onlyAdmin accepts only the current admin.
  4. Original admin finalises instead: addrA repeats the call and succeeds. The function assigns admin = addrB and clears pendingAdmin, even though addrB never interacted.
  5. Failure mode: If addrA disappears between steps 2 and 4—lost keys, compromised wallet—the takeover cannot complete. Governance stays bound to addrA.

The original report as published on Immunefi, by pxng0lin. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

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

  1. Deploy the contract with an admin address.
  2. The current admin calls the transfer function to nominate a new admin.
  3. The nominated address calls the accept function and the call reverts.
  4. 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.

More by pxng0lin

View all

4 more disclosed reports, best first.

More from Alchemix V3

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.