code-423n4 / 2023-11-panoptic-findings

0 stars 0 forks source link

Re: Unauthorized Fee Collection #593

Closed c4-bot-2 closed 10 months ago

c4-bot-2 commented 11 months ago

Lines of code

https://github.com/code-423n4/2023-11-panoptic/blob/main/contracts/SemiFungiblePositionManager.sol#L1201

Vulnerability details

Impact

The function collects fees from the Uniswap V3 pool without checking if the caller is authorized to collect fees for the specified position.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

Tools Used

Recommended Mitigation Steps

modifier onlyPositionOwner(bytes32 positionKey) { require(isPositionOwner(positionKey, msg.sender), 'Caller is not the position owner'); _; } function _collectAndWritePositionData(...) internal onlyPositionOwner(positionKey) { // existing logic }

Assessed type

Other

Picodes commented 10 months ago

The function is internal...

c4-judge commented 10 months ago

Picodes marked the issue as unsatisfactory: Invalid