A major macOS High Sierra bug allows anyone to enables the root superuser on a Mac using a blank password. The bug, discovered by developer Lemi Ergin, allows anyone to log into an administrator account by using “root” as the username and a blank password.
The bug allows access to an administrator’s account on an unlocked Mac, and also allows access at the login screen of a locked Mac.
To attempt to replicate the issue, follow the steps listed below from any kind of Mac account:
The root trick can also be used at the login screen to access a Mac after the feature has bene enabled in System Preferences by using the above steps. At the login scree, just click “Other,” and then enter “root” again, with a blank password. You’ll have admin-level access, and will be able to see everything on the computer.
An Apple spokesman told MacRumors that the company is working on a fix:
“We are working on a software update to address this issue. In the meantime, setting a root password prevents unauthorized access to your Mac. To enable the Root User and set a password, please follow the instructions here: https://support.apple.com/en-us/HT204012. If a Root User is already enabled, to ensure a blank password is not set, please follow the instructions from the ‘Change the root password’ section.”
Here are the instructions from the above link:
When the root user is enabled, you have the privileges of the root user only while logged in as the root user.
Remember to disable the root user after completing your task.