The _streams
mapping in the SablierFlowBase
contract may expose deleted or non-existent streams due to inadequate validation. This vulnerability can be exploited to reference and access data of streams that should be nullified or inaccessible.
The SablierFlowBase
contract provides several external getter functions to retrieve stream-related information using _streams[streamId]
. However, without thorough validation in these getters, a deleted or uninitialized stream could be accessed, causing unexpected behavior or exposing sensitive data.
Deploy the SablierFlowBase
contract on Hardhat.
Initialize a stream and verify it through the getBalance
function.
Delete or alter the stream state to mimic a deletion (using an internal method or test environment manipulation).
Call getBalance
again on the deleted stream ID.
Hardhat test:
Output:
The test revert with an error when attempting to access getBalance
on a deleted stream, confirming that the function call is susceptible to returning invalid data.
Exposing deleted streams allows unauthorized data access and inconsistency in stream management. Attackers could access or manipulate outdated information, leading to potential data leaks or unauthorized actions.
Manual review.
Implement a _streamExists
function to confirm the stream's validity or add validation within each getter function to ensure the stream's state is appropriate for querying.
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.