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

setPassword can be accessed by anyone

Summary

setPassword can be accessed by anyone

Vulnerability Details

there's no checks applied in setPassword function

function setPassword(string memory newPassword) external {
s_password = newPassword;
emit SetNetPassword();
}

Impact

password can be changed by the attacker

Tools Used

static analysis(no tool)

Recommendations

add a modifier or a check if msg.sender is actually the owner

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-lacking-access-control

Anyone can call `setPassword` and set a new password contrary to the intended purpose.

Support

FAQs

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