code-423n4 / 2024-04-panoptic-findings

7 stars 3 forks source link

Using delegatecall inside a loop. When calling delegatecall the same msg.value amount will be accredited multiple times. #510

Closed c4-bot-6 closed 4 months ago

c4-bot-6 commented 4 months ago

Lines of code

https://github.com/code-423n4/2024-04-panoptic/blob/main/contracts/multicall/Multicall.sol#L15

Vulnerability details

Impact

The use of delegatecall within a loop in a payable function can lead to security vulnerabilities. This pattern can cause the same msg.value amount to be accredited multiple times if used improperly, leading to incorrect accounting and potential exploits. It becomes especially dangerous if a future refactor introduces additional logic that relies on msg.value.

Proof of Concept

Tools Used

The following tools were used for identifying and documenting the bug:

Recommended Mitigation Steps

Assessed type

Context

c4-judge commented 4 months ago

Picodes marked the issue as unsatisfactory: Insufficient proof