You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The arbitrary calls in the cross-comain messengers allow anyone to drain them
Summary
Both cross-comain messengers can be drained due to them making arbitrary calls.
Root Cause
Any user can send messages from L1 -> L2 and vice-versa, on L2 these messages are executed by the L2CrossDomainMessenger, in the _executeMessage function. There the message is passed to a call with a destination which is only restricted to not be address(this) or L2_TO_L1_MESSAGE_PASSER.
User makes cross-chain call from L1 -> L2 or L2 -> L1, specifying a message by encoding for example token.approve(address(attacker), type(uint256.max))
This will then be executed by the either the L1 or L2 messenger
User can now transfer tokens out of the messenger
Impact
Attacker can drain all funds from both messengers.
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered:
sherlock-admin3
changed the title
Quaint Mahogany Bat - The arbitrary calls in the cross-comain messengers allow anyone to drain them
n4nika - The arbitrary calls in the cross-comain messengers allow anyone to drain them
Oct 16, 2024
n4nika
High
The arbitrary calls in the cross-comain messengers allow anyone to drain them
Summary
Both cross-comain messengers can be drained due to them making arbitrary calls.
Root Cause
Any user can send messages from
L1 -> L2
and vice-versa, on L2 these messages are executed by theL2CrossDomainMessenger
, in the_executeMessage
function. There the message is passed to acall
with a destination which is only restricted to not beaddress(this)
orL2_TO_L1_MESSAGE_PASSER
.In the
L1CrossDomainMessenger
, the arbitrary call is made inproveAndRelayMessage
.Internal pre-conditions
None
External pre-conditions
None
Attack Path
L1 -> L2
orL2 -> L1
, specifying a message by encoding for exampletoken.approve(address(attacker), type(uint256.max))
Impact
Attacker can drain all funds from both messengers.
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered: