Missing New Recovery Spell Replacement in the Recovery Process, To Ensure Safe Can Be Saved Again #39
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-16
nullified
Issue is high quality, but not accepted
🤖_primary
AI based primary recommendation
🤖_01_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/solidity-labs-io/kleidi/blob/0d72b6cb5725c1380212dc76257da96fcfacf22f/src/RecoverySpell.sol#L154-L317
Vulnerability details
Description
The
RecoverySpell::executeRecovery()
function in theRecoverySpell
contract is designed to recover the safe by replacing recovery spell owners with safe owners that lost keys.However, once this recovery process is executed, the recovery spell is effectively a
one-time-use
operation, we will leaving no backup recovery mechanism in place for the safe.If new owners of safe lose their keys again after recovery and safe has no other recovery spells enabled as module(backup plan), owners of safe will be unable to recover their safe again.
This lack of a fallback could result in new safe owners being unable to use safe forever and interact with
Timelock
and most likely losing funds stored inside the Timelock, if theRecoverySpell
used to recover the safe, was their last recovery plan.Impact
In a situations where single
RecoverySpell
contract is the last recovery mechanism set in place for the safe, if the keys are lost again after a successful recovery, the new owners will have no way to regain access to safe again.This creates a critical situation where we have inablity to restore our funds from Timelock since We can't access Safe to Schedule Operations.
Proof Of Concept
Lets say our safe has only single Recovery Method Available. after using it and recovering our safe, we will leaving our safe with no backup plan, meaning if we forget to set new
RecoverySpell
as safe module, there's no way to recover our safe if new owners lost private keys again.so for that reason it is critical to enforce owners of
RecoverySpell
, to add replacement as recovery method, in safe recovery process.Recommended Mitigation
RecoverySpell.sol
:newRecoverySpell
to theexecuteRecovery()
function. This parameter should take the address of a new recovery spell, which will be added as a safe module during the recovery process. This will ensure that a replacement recovery mechanism is set up when the current spell is used. The modified process could look like this:Assessed type
Other
The text was updated successfully, but these errors were encountered: