When our account is created, we use the initializeAccount function to initialize it with some init data, which calls the bootstrap contract with delegate calls. In the bootstrap contract, we have different functions to initialize our account with modules and registry.
In the bootstrap contract, there are three functions used to initialize our account. All these functions first install the module and then configure the registry. When installing the module, we check if it was attested by enough attesters using the withRegistry modifier. However, if our registry address is zero, it does not revert and continues the execution.
We can see initNexusWithSingleValidator, initNexus, and initNexusScoped. All these functions first install the modules and then configure the registry, which can cause the wrong module to be installed.
https://github.com/Cyfrin/2024-07-biconomy/blob/main/contracts/utils/RegistryBootstrap.sol#L38
https://github.com/Cyfrin/2024-07-biconomy/blob/main/contracts/utils/RegistryBootstrap.sol#L55
https://github.com/Cyfrin/2024-07-biconomy/blob/main/contracts/utils/RegistryBootstrap.sol#L93
This can cause a loss of user funds, a DoS attack, and other security problems. For example, in Scenario 1, a user installs a non-audited executor with bugs, allowing anyone to make calls to accounts without authorization, permitting the execution of any call on our smart account. In Scenario 2, installing the wrong hook module can cause DoS attacks.
Manual
In the bootstrap contract, we should first configure the registry and then install any module. For example, with our initNexusWithSingleValidator function:
Valid high, since a security feature is compromised, I believe this warrants high severity.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.