The Nexus account storage could be changed maliciously because of delegatecall and arbitrary bootstrap address in initializeAccount
initializeAccount
function in Nexus.sol
doesn't validate the bootstrap address, so it can be arbitrary address.
And factory contracts including NexusAccountFactory.sol
and RegistryFactory.sol
don't validate whether the initData
includes a valid bootstrap address.
So attacker can deploy a useless Nexus account in following way:
1 deploy a contract using the code below. Assume the address is 0x123.
2 deploy a fake bootstrap address using the code below.
3 deploy a Nexus account by calling createAccount
in NexusAccountFactory.sol
. initData
is set as data which is got from getInitData
in step 2 contract. salt
could be any value.
4 Get a useless Nexus account because implementation is 0x123.
There are also other ways to broke the newly deployed Nexus account, for example change other storage in Nexus account by delegatecall and arbitrary bootstrap address in initializeAccount
.
Using malicious initData could get a useless Nexus account.
manual
In NexusAccountFactory.sol
and RegistryFactory.sol
validate the bootstrap address properly. Maybe consider ways in K1ValidatorFactory.sol
.
Invalid, - Checked [here](https://github.com/rhinestonewtf/sentinellist/blob/6dff696f39fb55bfdde9581544d788932f145e47/src/SentinelList.sol#L30-L32) based on `SentinelListLib` used as dependencies as seen [here](https://github.com/Cyfrin/2024-07-biconomy/blob/9590f25cd63f7ad2c54feb618036984774f3879d/contracts/interfaces/base/IStorage.sol#L34-L35). Contract cannot be reinitialized - front-running initializers invalid per [codehawks guidelines](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid)
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.