Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: low
Invalid

Unsafe Low-Level Calls and Unused Address Library in codebase

Summary

The MembershipERC1155 contract imports the OpenZeppelin Address library but does not utilize its safe call functions. Instead, the contract makes direct low-level calls, which can be unsafe and prone to errors.

Vulnerability Details

the MembershipERC1155 contract imports the OpenZeppelin Address library does not use the Address library's safe call functions, such as functionCall, functionCallWithValue, or functionStaticCall. Instead, it uses direct low-level calls, as seen in the `callExternalContract` function:

(bool success, bytes memory returndata) = contractAddress.call{value: msg.value}(data);
require(success, "External call failed");

Impact

Direct low-level calls using .call do not provide safety checks and can lead to unexpected behavior if the called contract reverts or returns unexpected data.

Tools Used

Recommendations

  • Replace direct low-level calls with the safe call functions provided by the Address library to ensure robust error handling and security checks.

Updates

Lead Judging Commences

0xbrivan2 Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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