Multicall feature in SourceBridge may be abused to send arbitrary messages to the Axelar service #445
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-a
low quality report
This report is of especially low quality
primary issue
Highest quality submission among a set of duplicates
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2023-09-ondo/blob/main/contracts/bridge/SourceBridge.sol#L160
Vulnerability details
The SourceBridge contract includes a function to allow a "multicall" feature from the contract. Even though this function is access protected, it could be abused to send any arbitrary message to the Axelar service, enabling arbitrary minting through the bridge.
Impact
The SourceBridge contract is in charge of implementing token bridging in the source chain: it burns tokens from the caller and relays the message to the destination bridge in the destination chain using the Axelar service. The DestinationBridge contract validates the message is coming from the registered source bridge address for the given chain and proceeds with the minting in the destination chain.
The SourceBridge contract also contains a "multicall" feature to allow execution of multiple transactions in a batched fashion:
https://github.com/code-423n4/2023-09-ondo/blob/main/contracts/bridge/SourceBridge.sol#L160-L171
This feature allows to make arbitrary calls to any recipient on behalf of the SourceBridge. When combined with the contract's capability to send messages through the bridge, it introduces the risk of relaying arbitrary messages through the bridge, potentially leading to arbitrary token minting in the destination chain.
Even though the
multiexcall()
function is access protected, this represents a huge risk since the contract interfaces directly with the bridge service and may lead to severe consequences if abused.Proof of Concept
multiexcall()
to send a call toAXELAR_GATEWAY.callContract()
using the same payload that is constructed by usingburnAndCallAxelar()
.Recommended Mitigation Steps
Remove the
multiexcall()
function from the SourceBridge contract.Assessed type
Other
The text was updated successfully, but these errors were encountered: