- Affected version
- 2.2.12
When activating any two step authentication method, XenForo also generates a list of backups codes.
Those backup codes are stored as plaintext in the database and shown to the user when accessing
Storing those codes as plaintext in the database seems a security issue to me; if an attacker gets access to those codes, he can use them to log into accounts effectively bypassing stronger options (like TOTP) set up on accounts.
Therefore, backup codes IMHO should probably be treated like other secrets (=> password) as well and not be stored as plaintext; instead hashes should be stored.
Doing so would mean that the user can't view the backup codes after they have been generated, but that shouln't be a real issue:
There is no need for the user to view unused codes again after they have been generated; if he has lost access to the codes just generate new ones - used codes could still be displayed.
Those backup codes are stored as plaintext in the database and shown to the user when accessing
account/two-step/backup/manage
.Storing those codes as plaintext in the database seems a security issue to me; if an attacker gets access to those codes, he can use them to log into accounts effectively bypassing stronger options (like TOTP) set up on accounts.
Therefore, backup codes IMHO should probably be treated like other secrets (=> password) as well and not be stored as plaintext; instead hashes should be stored.
Doing so would mean that the user can't view the backup codes after they have been generated, but that shouln't be a real issue:
There is no need for the user to view unused codes again after they have been generated; if he has lost access to the codes just generate new ones - used codes could still be displayed.