Many users are recently experiencing the same error while using the scanner due to a curl error in WordPress. You can read all about it here. We have come up with a workaround until WordPress releases a fix for the error.
Please add the below given code snippet to the functions.php of the active theme file to fix the issue until the next WordPress update.