During fuzz testing of the deployment functions in Deployer.sol, vulnerabilities were identified where the contract does not properly handle invalid inputs such as empty strings. This report details these issues, the expected behavior, and recommendations for addressing them.
The fuzz tests revealed that the deployERC721 and deployERC1155 functions did not adequately check for invalid inputs, like empty strings. When such inputs were provided, the functions failed to revert, leading to the deployment of contracts with incorrect parameters.
Severity: Medium
The improper handling of invalid inputs can lead to the deployment of contracts with incorrect parameters or metadata. Although the contract itself may not be critically compromised, this can lead to user confusion, mismanagement of contract state, and potential issues with downstream processes relying on correct contract data.
Manual review
Fuzz testing in foundry
Check all Inputs:
Ensure that all input parameters in the deployment functions are non-empty.
Use the require statement to enforce this validation:
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.