Submitted by 0xAsen, also found by klau5 and fyamf
In settlement.cairo::receive_cross_chain_msg - the payload_type can be passed by the user, confusing offchain systems.
The payload_type parameter is only used to emit events so that the Chakra nodes can detect and process them.
There is no validation for it and given that it is used in an event to which off-chain systems listen to, the payload_type values will be displayed in the explorer, and there may be other extensions in the future, according to the sponsor.
This can lead to incorrect data being displayed and undefined behavior in the future.
Lets see the code of receive_cross_chain_msg:
You can see that the payload_type parameter is not used anywhere in the function except for the emission of the event.
So what could happen is:
Include the payload_type in the message hash generation thus making sure that its value cannot be altered.
zvlwwj (Chakra) disputed and commented:
0xsomeone (judge) increased severity to High and commented:
