File affected:
|
skipRuntimeValidation: true, |
Description
The executionManifest() function in the ColdStorageAddressBookModule contract configures the addAllowedRecipients() function with skipRuntimeValidation: true.
With skipRuntimeValidation: true, the ERC-6900 validation skips all validation for runtime calls to this selector. Any external address can call account.addAllowedRecipients([attackerAddress]), and the account forwards the call to the module without checking authorization. Since msg.sender in the module is the account itself, the attacker's address is added to the account's allowlist.
Meanwhile, removeAllowedRecipients() correctly configures validations with skipRuntimeValidation: false.
Exploit scenario
- Account has the
ColdStorageAddressBookModule execution module installed.
- An attacker calls
account.addAllowedRecipients([attackerAddress]). No validation is required. The attacker's address is added to the account's allowlist.
- The attacker as now an allowed address. The user can be phished into sending the attacker tokens.
Recommendation
Change the manifest configuration for addAllowedRecipients() to skipRuntimeValidation: false.
File affected:
buidl-wallet-contracts/src/msca/6900/v0.8/modules/addressbook/ColdStorageAddressBookModule.sol
Line 238 in 3c47aa9
Description
The
executionManifest()function in theColdStorageAddressBookModulecontract configures theaddAllowedRecipients()function withskipRuntimeValidation: true.With
skipRuntimeValidation: true, the ERC-6900 validation skips all validation for runtime calls to this selector. Any external address can callaccount.addAllowedRecipients([attackerAddress]), and the account forwards the call to the module without checking authorization. Sincemsg.senderin the module is the account itself, the attacker's address is added to the account's allowlist.Meanwhile,
removeAllowedRecipients()correctly configures validations withskipRuntimeValidation: false.Exploit scenario
ColdStorageAddressBookModuleexecution module installed.account.addAllowedRecipients([attackerAddress]). No validation is required. The attacker's address is added to the account's allowlist.Recommendation
Change the manifest configuration for
addAllowedRecipients()toskipRuntimeValidation: false.