mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Bot spammed database what should i do? - Admin Panel can't load anymore. Over 40K Accounts have been created... #1252
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Skyfay on GitHub (Apr 15, 2022).
A bot has spammed my Vaultwarden with an extremely large number of accounts.
He has apparently created over 40,000 accounts.
Fortunately, the performance is good, but the Admin Panel tab users now loads extremely slowly.
Is there a command to remove these users at once with one command?

Is there a possibility that users who have created an account but have not logged in for 1 week will have their account deleted?
If these accounts were created with the same IP, I think that's a security risk...
What should I do now?
@BlackDex commented on GitHub (Apr 15, 2022):
You could try to solve this in two ways.
Either use the admin API via curl or something. there is a
/admin/usersendpoint which returns all the users with all the info as a json. You could use that to filter those users. And then generate aPOSTto/admin/users/<uuid>/deleteto delete these users.That would be the safe way.
The other way would be to delete these users directly from the database.
It should just be as easy as removing those users from the
userstable.You may also need to remove the from the
invitationstable, but I'm not sure from the top of my head.Both options should work. And looking at the users since they are not linked to an organizations or have any vault items, both should work just fine.