Created this account to help the guy but my permissions don't allow me to reply to his post. I just spent a week cleaning the exact same issue. This is what I had to do:
Go through and clean all malicious code (it seems to corrupt common themes in the fuctions.php, footer.php and header.php files), delete unused themes, change all admin passwords, change hosting/cpanel password, ftp password(s), and most importantly, change the database password (and update wp-config with the new password). Make sure all plugins and WP is up to date. If any of the auto-created users come back, repeat the process. Do a Wordfence scan and keep an eye on the users (turn on admin login email notifications in Wordfence just in case).
Edited by hamluis, 25 June 2024 - 02:18 PM.
Moved from MRL to Gen Sec - Hamluis.