A flaw was found in Linux-Pam in the way it handle empty passwords for non-existing users. When the user doesn't exist PAM try to authenticate with root and in the case of an empty password it successfully authenticate.
Reference: https://github.com/linux-pam/linux-pam/issues/284
Upstream patch: https://github.com/linux-pam/linux-pam/pull/300