Admin transfer leaves stale emergency pause authority
The admin handoff flow leaves the previous admin's address as the emergency admin because accept_admin rotates only the pool admin and upgrade admin, not EMERGENCY_ADMIN. A former admin can still pause reserves or halt reserve deployment, blocking user actions such as supply, withdraw, borrow, repay and liquidation.
Submitted by v12, also found by nuhtasha and Sikoh
Found by V12
contracts/pool-configurator/src/contract.rs#L504contracts/pool-configurator/src/contract.rs#L14contracts/pool-configurator/src/contract.rs#L275contracts/pool-configurator/src/contract.rs#L302contracts/pool-configurator/src/storage.rs#L113contracts/pool-configurator/src/reserve.rs#L334
Targets
- PoolConfiguratorContract::accept_admin
- storage::validateemergencyadmin
- reserve::setreservepause
- PoolConfiguratorContract::initialize
- PoolConfiguratorContract::pausereservedeployment
- PoolConfiguratorContract::unpausereservedeployment
Affected Locations
- PoolConfiguratorContract.accept_admin:
accept_adminrotatesPOOL_ADMINand the upgrade admin but does not update or clearEMERGENCY_ADMIN, leaving the former admin authorized after handoff. - storage.validateemergencyadmin:
validate_emergency_adminauthorizes either the stored emergency admin or the current pool admin, so the stale address continues to satisfy emergency checks. - reserve.setreservepause: Stale emergency authority reaches reserve pausing, which updates live reserve state and causes router-side paused-reserve checks to reject user actions.
- PoolConfiguratorContract.initialize:
initializesetsEMERGENCY_ADMINto the same address as the initialPOOL_ADMIN, anchoring emergency authority to the original admin. - PoolConfiguratorContract.pausereservedeployment: A former admin can still call this deployment pause entrypoint because it is protected by the stale emergency-admin authorization path.
- PoolConfiguratorContract.unpausereservedeployment: A former admin can still call this deployment unpause entrypoint because it is protected by the stale emergency-admin authorization path.
Description
The admin handoff flow leaves emergency authority behind on the previous admin address. During initialize, the contract stores the initial admin into both POOL_ADMIN and EMERGENCY_ADMIN, but accept_admin later rotates only POOL_ADMIN and the upgrade admin. Because storage::validate_emergency_admin accepts either the current pool admin or the stored emergency admin, the old address continues to pass authorization indefinitely after transfer. That stale privilege still reaches pause_reserve_deployment, unpause_reserve_deployment, and reserve::set_reserve_pause, so a retired or compromised former admin can keep changing emergency-controlled protocol state. The issue accumulates across transfers because there is no path to clear or rotate EMERGENCY_ADMIN after initialization.
Root Cause
accept_admin updates POOL_ADMIN but never synchronizes or clears EMERGENCY_ADMIN, while validate_emergency_admin continues accepting the stored emergency-admin address.
Impact
A former admin can still pause reserves or halt reserve deployment after governance believes control has been transferred away, causing router checks on paused reserves to block actions such as supply, withdraw, borrow, repay, liquidation, and similar asset interactions. If the old admin key was compromised or intentionally removed, the attacker retains effective emergency control and can trigger a temporary freeze of live markets until the current admin reverses the changes.
Proof of Concept
See this gist for full Proof of Concept
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
accept_admin updates POOL_ADMIN but never synchronizes or clears EMERGENCY_ADMIN, while validate_emergency_admin continues accepting the stored emergency-admin address.
Impact
A former admin can still pause reserves or halt reserve deployment after governance believes control has been transferred away, causing router checks on paused reserves to block actions such as supply, withdraw, borrow, repay, liquidation, and similar asset interactions.
What the attacker needed
Admin transfer has occurred; former admin address is known
The fix
accept_admin should also update or clear EMERGENCY_ADMIN so that the previous admin no longer retains emergency authority.
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 two admin roles: a main admin and an emergency admin who can pause things. When the main admin is changed, the emergency admin is not changed, so the old admin keeps emergency powers. That means someone who should no longer have control can still freeze parts of the system.
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.