Check whether macOS host is affected by serious vulnerability that enables access to the root superuser
According to Apple's support document on Security Update 2017-001 macOS Sierra 10.12.6 and earlier are not affected by the vulnerability:


  Not impacted: macOS Sierra 10.12.6 and earlier 


If you want to use terminal to find out if you're running 10.12.6 you may want to use the command 

sw_vers -productVersion

or refer to the question How to find out Mac OS X version from Terminal? on superuser.