Submitted by 0xNirix, also found by shaflow2, Draiakoo (1, 2), said, Abdessamed, and SBSecurity
The receive_cross_chain_callback function in the Cairo implementation of ERC20Handler uses an assert statement to validate handlers, which causes the function to revert if a handler is invalid or has been removed from the whitelist. This behavior differs from the Solidity implementation, which returns false for invalid handlers.
This vulnerability can lead to:
Cairo implementation:
Solidity implementation:
In the Cairo version, if a handler is invalid, the function will revert due to the assert statement, leaving the transaction in its current state (likely Pending). In contrast, the Solidity version returns false, allowing the calling Settlement contract to handle the invalid handler case appropriately.
Update the Cairo implementation to check handler validity without using assert.
zvlwwj (Chakra) confirmed
0xsomeone (judge) increased severity to High
