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
}
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