Submitted by pcarranzav, also found by immeas
https://github.com/code-423n4/2023-07-axelar/blob/9f642fe854eb11ad9f18fe028e5a8353c258e926/contracts/its/remote-address-validator/RemoteAddressValidator.sol#L72-L74
https://github.com/code-423n4/2023-07-axelar/blob/9f642fe854eb11ad9f18fe028e5a8353c258e926/contracts/its/remote-address-validator/RemoteAddressValidator.sol#L83
The InterchainTokenService is deployed using create3. This means, that its address depends on the address of the deployer wallet, the address of the Create3Deployer contract, and the salt that is extracted from a deployment key.
It should be feasible for the same deployer wallet to deploy a Create3Deployer with the same address on a new chain and use the same deployment key to deploy a contract with the same address as the InterchainTokenService, but with arbitrary implementation. A team member has confirmed on Discord that the address will be the interchainTokenServiceAddress which is constant across EVM chains.. However, at deployment time, only a subset of all the possible EVM chains will be supported, and more may be added in the future. When that happens, it is possible that the original deployer wallet is compromised or no longer available.
On the other hand, the addTrustedAddress function validates that the sender is the owner of the RemoteAddressValidator contract. This owner is originally the deployer wallet, but ownership may be transferred (and it would be a good practice to transfer it to a more secure governance multisig immediately after deployment). After ownership transfer, the previous owner should not be allowed to add trusted addresses.
However, the validateSender function will treat any address that is the same as the current chains InterchainTokenService as valid. A malicious contract deployed by the deployer wallet after the ownership transfer could be treated as valid and would have the ability to deploy token managers and standardized tokens, or perform arbitrary token transfers. This is a form of centralization risk but is also a serious privilege escalation, as it should be possible to strip the deployer of the ability to perform these actions. This gives them virtually unlimited power even after an ownership transfer.
Therefore, the tokens will be transferred to the deployer address on chain A.
The assumption that the InterchainTokenService address is valid in any chain is dangerous because of how the contract is created and the possibility that new EVM chains may exist in the future. A deployer EOA should not have this amount of permission for an indefinite time. I would recommend breaking that assumption and requiring that all addresses are added as trusted addresses explicitly.
A check can therefore be added to only treat the interchain token services address as valid if the source chain is also the same chain where the RemoteAddressValidator is deployed. The following diff shows a way to do this:
Access Control
pcarranzav (warden) commented:
berndartmueller (judge) commented:
deanamiel (Axelar) acknowledged and commented:
