Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Function arguments passed to setPassword() function can be read onchain

Vulnerability Details

Value of a setPassword() function parameter can be read onchain through block explorers like Etherscan.

26: function setPassword(string memory newPassword) external {
27: s_password = newPassword;
28: emit SetNetPassword();
29: }

Impact

Anyone can read the values of setPassword() function arguments onchain when called by the owner.

Tools Used

Manual Review

Recommendations

Consider keccak256 hashing the password before supplying it to the setPassword() function call.

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 2 years ago
inallhonesty Lead Judge about 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-anyone-can-read-storage

Private functions and state variables are only visible for the contract they are defined in and not in derived contracts. In this case private doesn't mean secret/confidential

Support

FAQs

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