Skip to content
Access control Audit finding Intermediate

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.

v12 Follow with nuhtasha and Sikoh

Originally disclosed on Code4rena

Submitted by v12, also found by nuhtasha and Sikoh

Found by V12

  • contracts/pool-configurator/src/contract.rs #L504
  • contracts/pool-configurator/src/contract.rs #L14
  • contracts/pool-configurator/src/contract.rs #L275
  • contracts/pool-configurator/src/contract.rs #L302
  • contracts/pool-configurator/src/storage.rs #L113
  • contracts/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_admin rotates POOL_ADMIN and the upgrade admin but does not update or clear EMERGENCY_ADMIN, leaving the former admin authorized after handoff.
  • storage.validateemergencyadmin: validate_emergency_admin authorizes 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: initialize sets EMERGENCY_ADMIN to the same address as the initial POOL_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


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

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.

More by v12

View all

37 more disclosed reports, best first.

More from K2

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.