Global and Individual Option to have password history be automatically cleared

It would be an amazing security feature to be able to have a default global preference for any new logins as well as be able to set this preference on individual logins.

I understand the convenience of it 100%. But, it would be good in my case to be able to have the password history of all my passwords cleared every 45 days or so.

Why do you need 45 days? Under what conditions might you use a password history on Day 44? And what would happen if the same conditions arose instead on Day 45, just after the histories have been expunged?

1 Like

I update the passwords of some accounts on a monthly basis. So it would be good to keep the password history of a password I made a month ago once I go to make the new one. I give myself additional days in case I can’t get the stuff done immediately.

Do you always update all of these accounts on the same day (or within a 2-week period)? If not, some of the old passwords could get erased earlier than expected (i.e., after less than a month) if the feature is implemented the way that you have requested it.

It sounds like perhaps a better solution would be an option to restrict the password history list to store only a single password at a time.

It turns out that there is a little-known bug in the password history implementation that can be exploited to achieve just this functionality. For each vault item where you want to limit the size of the password history to only N entries (N = 0–4), edit the item and create a specific number (M) of custom fields of the hidden type, where M = 6–N (e.g., in your case, to keep only one password in the password history, create five such hidden custom fields).

Each of the hidden custom fields created for this purpose should be given the same field name, but a unique field value. For example, in the example below, the field name has been set to pwpurge for all five fields, and the field values are set to 1, 2, 3, 4, and 5, respectively:

Save the edited item after you have added these fields.

Now, each time that you change the password of the item, the password history will contain only the most recent value of the password, as shown below:

The caveats with this method are that it will stop working if Bitwarden fixes the bug, and that the password history (i.e., the one most recently used old password) will be lost if you ever edit and save the vault item without updating the password (e.g., if you are editing some other information stored in the item).

1 Like

Why clear the history in the first place? Presuming you follow good password practices by not reusing passwords, what is the security risk with keeping a historical record of the old values?

I have encountered three scenarios where destroying old passwords would have left me in the lurch:

  1. The password-change mechanism silently fails and I do not notice until the next login.
  2. The server suffered a failure and needed to be restored to yesterday’s backup. Those that changed their password this morning need to know their old password.
  3. If I change my work password and my laptop is at home, it continues to use the old password until I bring it into the office so that it can sync with Active Directory.

I get that “one” old password may be enough, but I have had times where my new work password was not accepted so I had to select a new one moments later — meaning that the laptop would need the 2x old password.

I have a use case for bulk/individual clearing of password history.

I use randomely generated bitwarden passwords to which I add a “base” (always the same one). I used to write this base in Bitwarden along with the password for convenience (autofilling) but that made it useless, so I decided to stop using password autofill and delete that part of the password from all my items. So now, even if my account items somehow leaked or got hacked, there is still no way to use my logins without knowing that part of the password that only I know.

The only thing is that I recently noticed that the full password is actually still in the password history lol, so I’d like to have an option to delete it :+1: I also think there’s a number of reasons sensitive data could end up in password history, especially if you are not the only one with access to the vault, so a feature to clear history would be good

It may take a little bit of work, but you can use the method described above to clear your password histories (while waiting for the proposed feature to be implemented).

1 Like

Yes, I read the previous answer. The method is interesting for someone who updates their passwords frequently and wants to restrict the number of old passwords saved, but in my case it might be quicker to just delete the item and create a new one. If Bitwarden does not implement this feature in a near future I might resort to one of those 2 options, but I have a few hundred passwords and would rather not do that individually. Thanks anyways!

1 Like

Depending on the complexity of data in your vault, you may have other options. If your vault contains neither Card items, Identity items, file attachments, passkeys, customized “URI Match Detection” settings for individual URIs, nor custom fields of the types “hidden”, “linked”, or “checkbox”, then you could create a CSV export, purge your vault, and import the CSV file. This will eliminate all password histories at once (along with all of the other things listed above).

Alternatively, you could do a more surgical removal of password histories using the Bitwarden CLI, if that is something you are comfortable with.

1 Like

Oh, I didn’t know that CVS exports didn’t include all those things, that might juste solve my problem. I’ll look into into it, thanks!

1 Like

Before purging your vault, I would suggest also creating an export using the “ZIP” format, which will capture that data that is discarded in the CSV export. That way you will have a backup for restoring your vault to its pre-purge state, should something go awry.

Please also be aware that both the CSV and ZIP formats are unencrypted, so you should take steps to ensure that sensitive data does not remain on your disk after you have completed the vault clean-up work.

1 Like

I see, thanks for the heads up.