Skip to content

UniswapV3 adapter path parameter extraction vulnerability

Description

The UniswapV3 adapter implements incorrect extraction of path parameters, potentially leading to security vulnerabilities. This issue is related to improper validation of specified index, position, or offset in input.

Examples

Insecure Code

solidity
$PATH.toAddress($PATH.length - $ADDR_SIZE);

Secure Code

solidity
$PATH.toAddress($PATH.length - $ADDR_SIZE + 1); // assuming $ADDR_SIZE is correct and the offset should be adjusted

Remediation

Validate and correctly extract path parameters to prevent potential security vulnerabilities.

Rule Details

FieldValue
IDCODE-0433
CategoryCrypto
SeverityHIGH
CWECWE-1285
ConfidenceLOW
ImpactHIGH
LikelihoodLOW
ExploitabilityCOMPLEX
Tagssmart contract, uniswapv3
OWASPN/A

References