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.