function called sendToL1 that sends Ether to an arbitrary address based on a signed message. The function is vulnerable to a dangerous call that could allow an attacker to withdraw unauthorized funds from the contract.
Source Link:- https://github.com/Cyfrin/2023-11-Boss-Bridge/blob/dad104a9f481aace15a550cf3113e81ad6bdf061/src/L1BossBridge.sol#L121
The impact of the above issue is that the function sendToL1 could be exploited by an attacker who can create a fake signed message that instructs the contract to send Ether to their own address. This could allow the attacker to drain the funds from the contract and cause a loss of Ether for the legitimate users. Therefore, it is important to protect the function from dangerous calls that could send Ether to an arbitrary address.
slither
foundry
the recommendation is to add a modifier to the function that checks if the target address is a whitelisted one. For example, you can create a mapping of addresses that are allowed to receive Ether from the contract, and then use a modifier like this:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.