DeFiHardhatOracleProxyUpdates
100,000 USDC
View results
Submission Details
Severity: low
Invalid

Lack of Validation on convertData in LibConvert.convert Function

Vulnerability Details

The convert function in the LibConvert library accepts a convertData bytes parameter to determine the type of conversion and the associated parameters. It decodes the convertData using functions from the LibConvertData library based on the ConvertKind enum. However, there is no explicit validation of the convertData before it is used to call the respective conversion functions in other libraries.

Impact

The absence of validation poses a high risk, as malformed or maliciously crafted convertData could lead to unexpected behavior, including but not limited to:

  1. Transfers of incorrect token amounts

  2. Interactions with unintended token addresses

Tools Used

Manual Review

Recommendations

Implement thorough validation checks on the convertData within the convert function before proceeding with any conversion logic. This should include, but not be limited to:

  1. Ensuring that token addresses are non-zero and are part of a list of allowed tokens

  2. Checking that amounts are within reasonable bounds and are not zero

  3. Verifying that the data structure of convertData matches the expected format for the given ConvertKind

Updates

Lead Judging Commences

giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
Assigned finding tags:

Informational/Invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.