Is it possible for a third party app to access macOS's clipboard content? I am asking in relation to copy & paste sensitive data such as passwords and sensitive file content.

  • Welcome to Ask Different. Unfortunately, your question doesn't provide enough detail for us to help you. Reading how to ask a question may improve your chances of getting a good answer. For now, can you please edit your question (there's an edit link below it) to add info such as: (1) What version of macOS you're running? (2) If you're on macOS Sierra, are you referring to just the normal clipboard, the universal clipboard, or both? (3) When you refer to third party app, what do you actually mean by this? – Monomeeth Apr 20 '17 at 10:35
  • Rather than close this as too broad, I've removed your follow on question. Please review help center and the comments above before asking how to modify clipboard. That will allow us to migrate code level questions to an appropriate site if you are seeking to program something as opposed to configure the os. – bmike Apr 20 '17 at 11:15
  • well for one thing you definitely cannot copy+paste anything in a password box on macOS... – dalearn Apr 20 '17 at 15:51
  • 2
    @dalearn To be more precise, you can paste INTO a password box, but you can't copy FROM a password box. I know I've frequently copied passwords from Keychain Access to password input boxes. – Barmar Apr 20 '17 at 22:24
  • 1
    It's a valid question. It does not matter what version of OS X/macOS. Third party meaning is very clear to anyone. – Pratik Apr 21 '17 at 3:30

No security for data that is in one of the system clipboards is possible by design.

The macOS clipboard is a public billboard open to all processes. Clipboard is the mechanism to let all apps read / modify shared data.

Either restrict your set of apps installed to those you trust with the data or don't ever copy sensitive content into the clipboard for your least trustworthy app.

From here, the rabbit hole for developers and security minded people using macOS begins with an overview of secure text input options within programs to prevent key loggers in addition to pasteboard snoopers from grabbing secure input:

  • 3
    @SargeBorsch That's what password managers are for, generally. I expect there are safe password managers for Mac OS; though I also expect that applications with the same or higher level of permissions could intercept their methods as well. – Luaan Apr 20 '17 at 12:58
  • 6
    @SargeBorsch - Even unintentional security flaws go unnoticed in open source, much less actual malicious backdoors and trojans. The notion that any old user is capable of inspecting the code of any nontrivial piece of software they use, then build it on their machine once it's known to be safe - after doing so for the compiler, of course - is flat out ridiculous, and contradictory to actual practice. (I.e. using package repositories with signed packages, meaning you implicitly trust a distribution's contributors to take care of this for you.) – millimoose Apr 20 '17 at 19:36
  • 3
  • 1
    @JörgWMittag how is that related to password managers? Are you trying to prove that since OS, CPU, compilers, etc may be hacked, the quality/availability of other software's source code doesn't matter? – Sarge Borsch Apr 23 '17 at 15:54
  • 1
    @Wowfunhappy A plain text password means you have to secure physical access to your Mac and trust all apps that read the clipboard. If your threat model is you don't trust your apps and your access - you need to use UBIKEY or multi factor auth and assume the password will leak. Everything is a risk and if it's wide open depends on your specific threat model. – bmike Nov 27 '18 at 21:28

Any process with sufficient permissions can read your clipboard at any time, and you can't easily prevent this. Security is always a trade-off with usability, and this is the choice that most (but not all) OSes take when implementing the clipboard.

Some apps that store sensitive data (e.g. 1Password) implement a timeout such that any information you copy out of that application is cleared from the clipboard a short time later. If you'd like to do something like that globally, you could look at the answers to this previous question for ideas.

  • 1
    Great point that by clearing known sensitive content on a timer, you limit the time frame where a less trusty process can be launched and snoop on text from the clipboard. This also lessens the risk someone would walk away from a computer and have the password to paste hours later into twitter or other social media. – bmike Apr 21 '17 at 2:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .