The reinit_oapp did not update the delegate when setting a new admin.
Summary
The reinit_oapp did not update the delegate when setting a new admin. This causes the old admin address to still be able to interact directly with the endpoint and influence cross-chain messages, while the new admin does not have this privilege.
Root Cause
When the oapp_config is initialized for the first time, the admin is set as the delegate. However, during reinitialization (reinit), when a new admin is set, the delegate address is not updated. This results in the new admin not being granted the necessary permissions, while the old admin's permissions are not revoked.
Additionally, in the transferAdmin function, the project team added a TODO tag when updating the delegate. This indicates that the team anticipated updating the delegate when the admin changes.However, the above situation was not taken into account.
When calling reinit_oapp, the new admin address was switched.
Attack Path
None
Impact
Since the delegate address can configure oappConfig through the endpoint and influence the execution of cross-chain information, the removed admin role still retains these permissions, while the new admin cannot obtain them.
Brisk Felt Lark
Low/Info
The reinit_oapp did not update the delegate when setting a new admin.
Summary
The reinit_oapp did not update the delegate when setting a new admin. This causes the old admin address to still be able to interact directly with the endpoint and influence cross-chain messages, while the new admin does not have this privilege.
Root Cause
When the
oapp_config
is initialized for the first time, the admin is set as the delegate. However, during reinitialization (reinit
), when a new admin is set, the delegate address is not updated. This results in the new admin not being granted the necessary permissions, while the old admin's permissions are not revoked.Additionally, in the
transferAdmin
function, the project team added a TODO tag when updating the delegate. This indicates that the team anticipated updating the delegate when the admin changes.However, the above situation was not taken into account.Internal pre-conditions
None
External pre-conditions
When calling
reinit_oapp
, the new admin address was switched.Attack Path
None
Impact
Since the delegate address can configure
oappConfig
through the endpoint and influence the execution of cross-chain information, the removed admin role still retains these permissions, while the new admin cannot obtain them.PoC
No response
Mitigation