Anybody can call withdraw for a streamId as long as they specify the receiver of the tokens to be the owner of the streamId
https://github.com/Cyfrin/2024-10-sablier/blob/8a2eac7a916080f2022527408b004578b21c51d0/src/SablierFlow.sol#L792-L794
This could be an issue is the current owner is a contract that doesnt have logic to handle the received tokens
lets take a simple example
a stream is created to payments to a worker, however that worker is only meant to get paid at the end of the month so the company stores their workers streamId in an escrow until the end of the month
To ensure the workers funds are safe, the escrow itself can only transfer the streamId to the expected workers or call withdtaw with the "to" param set as the expected worker
A malicious actor can call withdraw at any point, in the month preferably towards the end to cause maximum loss, to withdraw the tokens to the escrow
As a result this funds wlll be lost forever as the escrow doesnt contain any logic for withdrawing the tokens that are altready in it
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.