I also had this issue shortly after I upgraded to 10.13.1 from Sierra. I was trying to connect to a friend's WiFi and entered the password incorrectly two or three times consecutively. The "Cancel" button within the password dialog ceased to function which made the dialog impossible to close, and although the checkbox for "Show password" would respond to a click, the visibility of the text within the password would not change from hidden. I could only close the dialog by logging out, and the issue persisted even after restarting.
A few moments ago I did the following and can no longer reproduce the issue, so this may be a fix:
- Save all work and quit all applications.
- Open Activity Monitor and find the process named WindowServer.
- Force quit WindowServer. This will cause the screen to go dark for a moment. The lock screen should eventually appear.
- Log in and wait for the OS to finish starting up. Note: For some reason at this point my computer went to sleep and would not wake until I connected the charger, even though the battery indicator read ~30% before beginning these steps.
I could then connect to WiFi using the correct password. I tried deliberately entering the wrong password several times, and the dialog behaved correctly, i.e., I could close it using the "Cancel" button.