Only display blinking cursor in the Master Password field if Bitwarden app has focus

Feature name

  • Security Enhancement: Disable blinking cursor in Master Password field if app does not have focus when unlock or login screen is first rendered.

Feature function

  • This will fix a vulnerability that could unintentionally cause a user to type their master password into a clear-text field in an unrelated app (e.g., Word, Zoom, Skype, Messenger), which could inadvertently be shown to others.
  • When launching a Bitwarden app or browser extension that for a vault that is locked or logged out, there is a delay (sometimes short, sometimes long) before the unlock/login screen is rendered. If a different app is given focus in the time between the Bitwarden launch command and the rendering of the Bitwarden unlock/login screen, the Bitwarden app is apparently assuming that it still has focus, and therefore displays a blinking cursor in the Master Password/PIN entry field. This makes the user believe that the Bitwarden app doe haves focus (when it actually does not), so they will type their Master Password. If the actual focus is in any window that accepts keyboard text input, then the typed Master Password will be displayed in clear-text. If the app with focus is something like a chat or messenger window, or a window that is being displayed through screen-sharing, a the Master Password can be compromised.
  • This vulnerability is most dangerous for persons who do not touch-type, and therefore will have their eyes on the keyboard instead of on the Master Password text entry field while typing.
  • After the Bitwarden app has launched and the unlock/login screen has been rendered, moving focus to another app does extinguish the blinking cursor, as expected. The misleading visual cue only occurs when another app takes focus while the Bitwarden app is in the process of getting the unlock/logins screen ready for display.