Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: medium
Invalid

Lack of Input Validation

Summary

The get_players function in the provided Vyper contract contains a potential lack of input validation vulnerability. This vulnerability arises due to the absence of a check to ensure that the index provided is within the bounds of the players array.

Vulnerability Details

In the get_players function, there’s no check to ensure that the index provided is within the bounds of the players array. This could lead to a runtime exception if an out-of-bounds index is provided.

Impact

If exploited, this vulnerability could lead to unexpected behavior of the contract. An out-of-bounds error could cause the contract to revert, disrupting its normal operation and potentially leading to a denial of service.

Tools Used

Remix

Recommendations

To mitigate this vulnerability, you could add a check to ensure the index is valid before accessing the players array. Refactoring of code is in the github link.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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