Light ModeLight
Light ModeDark

One Bug Per Day

One H/M every day from top Wardens

Checkmark

Join over 450 wardens!

Checkmark

Receive the email at any hour!

Ad

InterchainProposalExecutor.sol doesn't support non-evm address as caller or sender

mediumCode4rena

Lines of code

https://github.com/code-423n4/2023-07-axelar/blob/2f9b234bb8222d5fbe934beafede56bfb4522641/contracts/interchain-governance-executor/InterchainProposalExecutor.sol#L24-L27

Vulnerability details

Impact

Axelar is supposed to support different chains, not only EVM. And this chains can have different address standard like Polkadot, Tron. This addresses can't be whitelisted in InterchainProposalExecutor.sol to execute proposal. Thus InterchainProposalSender implementation from non-EMV chain can't interact with InterchainProposalExecutor.sol on EVM chain.

Proof of Concept

Here you can see that sourceAddress is represented as address, not string:

solidity
// Whitelisted proposal callers. The proposal caller is the contract that calls the `InterchainProposalSender` at the source chain. mapping(string => mapping(address => bool)) public whitelistedCallers; // Whitelisted proposal senders. The proposal sender is the `InterchainProposalSender` contract address at the source chain. mapping(string => mapping(address => bool)) public whitelistedSenders; ... /** * @dev Set the proposal caller whitelist status * @param sourceChain The source chain * @param sourceCaller The source caller * @param whitelisted The whitelist status */ function setWhitelistedProposalCaller( string calldata sourceChain, address sourceCaller, bool whitelisted ) external override onlyOwner { whitelistedCallers[sourceChain][sourceCaller] = whitelisted; emit WhitelistedProposalCallerSet(sourceChain, sourceCaller, whitelisted); } /** * @dev Set the proposal sender whitelist status * @param sourceChain The source chain * @param sourceSender The source sender * @param whitelisted The whitelist status */ function setWhitelistedProposalSender( string calldata sourceChain, address sourceSender, bool whitelisted ) external override onlyOwner { whitelistedSenders[sourceChain][sourceSender] = whitelisted; emit WhitelistedProposalSenderSet(sourceChain, sourceSender, whitelisted); }

Tools Used

Manual Review

Recommended Mitigation Steps

Don't convert sourceAddress to address, use string instead

solidity
// Whitelisted proposal callers. The proposal caller is the contract that calls the `InterchainProposalSender` at the source chain. - mapping(string => mapping(address => bool)) public whitelistedCallers; + mapping(string => mapping(string => bool)) public whitelistedCallers; // Whitelisted proposal senders. The proposal sender is the `InterchainProposalSender` contract address at the source chain. - mapping(string => mapping(address => bool)) public whitelistedSenders; + mapping(string => mapping(string => bool)) public whitelistedSenders;

Assessed type

Invalid Validation