This vulnerability was discovered by security researchers from The Hacker News. The following password managers have affected browser extensions that are based on DOM (Document Object Model):
- 1Password
- Bitwarden
- Dashlane
- Enpass
- iCloud Passwords
- Keeper
- LastPass
- LogMeOnce
- NordPass
- ProtonPass
- RoboForm
https://emersion.fr/blog/2020/wayland-clipboard-drag-and-drop/
The graphical application must be in focus to gain access to the clipboard, and wayland is designed to prevent such focus stealing*. As mentioned earlier, password managers such as keepassxc will automatically clear your clipboard after copying sensitive data - this is a configurable behavior. This means that no other application should have the opportunity to steal focus, and your clipboard should be cleared of sensitive content before you open up a privacy dismissive application that wants to surveil your clipboard.
*I need to do a bit more digging to find further verification of this focus stealing prevention behavior of wayland, and if I can find that information I will cite here.
I noticed you were discussing the “notepad”, are you talking about the windows operating system? I cannot speak on its clipboard management, unfortunately. That said, I would not run the windows operating system if I cared about privacy. The erosion of privacy destroys any semblance of security, eh?
Edit: Following up, I did find some information from the vim text editor that discusses stealing focus in wayland. You can read about it here https://vimhelp.org/wayland.txt.html#wayland-focus-steal . So far, it appears as though applications do not have access to the clipboard unless focused, which is a design on wayland’s part to secure this. However, vim is showcasing a way to steal focus and thus subvert this security effort? It does note that if you are in a full screen mode then it cannot steal focus. Anyway, more reading to be done still. There appears to be methods of determining an application is doing this “focus stealing”
So with this behavior in mind, and with the way the clipboard works, no application would know what contents are inside the clipboard until in focus. Therefor an application would either have to “guess” when sensitive content is available, or steal focus quite often. The former being unlikely, and the latter most likely being able to be detected by the user.
Indeed I was referring to what I’m more familiar with regarding the clipboard, Windows, more particularly XP era.
It’s really neat and handy what all honest and local background services can do with an open clipboard, but yeah it’s also a total security nightmare when used nefariously.
I don’t know all that much about any newer versions of Windows, as I switched to Linux after the Windows 8 disaster came out.
I’m also not familiar with Wayland quite yet, though I’ve heard of it for a few years now. Anyways, I just play it safe and never copy any personal information into the clipboard, nor do I use a password manager, that’s what I have good brain memory for…
Thank you making me smarter!
There is one thing i don’t understand though. Wouldn’t the password manager need to have its window focused to clear the clipboard? And wouldn’t that allow any focused window to extract the information in the mean time?
Any time, we’re all in this together after all. I needed to learn some here as well, and if anybody comes by with follow up knowledge it is welcome.
As far as wayland works, source clients (the application you copy from) can clear the clipboard without stealing the focus. Note that if you copy from another client, the source client is now changed to the new one and the password manager will no longer be able to clear your clipboard. And this behavior is easily verifiable.
Unfortunately I am unsure if any focused application obtains access to clipboard content immediately or if the user needs to initiate some sort of
Ctrl+v
behavior. This would need to be followed up on. However, that is why I give my password manager a 10 second timeout to clear the clipboard. Honestly it could be shorter. But I do not alt tab through a bunch of random applications in the mean time. Typically I go straight to where the authentication is needed, and nowhere else. Meaning my clipboard should be cleared of sensitive data before I ever give clipboard access to another app.Better than other graphical compositors which simply broadcast your clipboard content to the entire ecosystem.
So where we’re at is 1) do apps get access to the clipboard immediately upon focus, and 2) what is happening where it appears some applications have hacked a way to steal focus.