Ctrl+C, Ctrl+v, Ctrl+cve: Bypassing Android's Clipboard Read Security Measures
30 points by dethmasque 3 hours ago | 14 comments

iloveyoutwo 23 minutes ago
GrapheneOS recently added secure paste: https://grapheneos.org/features#secure-paste
reply
chinhodado 47 minutes ago
A long time ago I wrote a dictionary app for my own use, which would show word definition upon the word being copied into the clipboard (e.g. from an e-book reader app). The dictionary app would run in the background and only show the pop up on clipboard event.

Then around Android 10 they tightened security and decided background apps can no longer receive clipboard event. Which makes sense from a security standpoint, but it totally broke my dictionary app. I just wish they're a way as a developer to get around it with my own app.

reply
Permik 5 minutes ago
I'm not sure if this was the documentation defined workaround, but they added the ACTION_PROCESS_TEXT intent, which could basically give near identical UX.
reply
anabab 6 minutes ago
Presumably apps can plug in entries in the system wide context menu? E.g. I have an Anki menu item (not talking about app selection screen to share content!) when selecting text in Firefox
reply
ryandrake 39 minutes ago
I feel like the clipboard is something that is on computers today only because it was invented back when dinosaurs roamed the earth, and we can't get rid of it as a concept because it's so ingrained in computing.

If we never had the clipboard (on any computer, not just Android) and it was suddenly invented today, it would never pass any major company's privacy or security review. Here we have something that allows the user to share any data instantly with any process that happens to be listening, including sensitive things like credentials, personal information, the works. It's a security nightmare! In today's paranoid times, no OS would say yes to a new feature like this, but we keep it because it's legacy and it can't be gotten rid of at this point.

reply
simonra 12 minutes ago
It works moderately well in securing against a program going rogue and trying to prevent the user from moving the data on their device to another program serving them better. (Or underrated but important, making it less painful to enter and re-enter information in say a dark pattern subscription cancellation form.) Unfortunately it's easily defeated as a security mechanism, but it's still way better than nothing.
reply
afzalive 26 minutes ago
One simple solution is just to gate the programmatic access by confirming with the user when the app wants to read the clipboard.
reply
hbn 19 minutes ago
iOS does this

You get an "Allow paste from <app>?" pop-up. Possibly only the first time you past from one app to another? Or maybe it resets after a while. I don't know the details.

reply
david422 27 minutes ago
What would you do instead?
reply
pluralmonad 26 minutes ago
Your comment is bordlerine absurd given the utility of such a thing as copy and paste. If it is satire, then you got me.
reply
krapp 19 minutes ago
Today's paranoid times?

The current status quo for software architecture is giving a swarm of LLM agents root and full access to user data and letting them run amok, unsupervised, connected to a proprietary remote black box service either being monitored by Palantir or the CCP. What is this "paranoia" you speak of?

reply
seszett 2 hours ago
I've always been irritated by the lack of control on whether apps can inspect the clipboard or not.

The bpost app (Belgian national post) immediately reads the clipboard when it gets opened and I hate this behaviour with a passion. While on the other hand it throws a fit if it ever detects an unlocked bootloader, root access, "suspicious" apps or whatever.

I ended up confining it to an outdated phone with a stock OS along with the bank and identity apps that I cannot avoid. I digress, but the original cause of my irritation was indeed lack of control on my clipboard that ia had noticed thanks to that small notification.

reply
Gander5739 2 hours ago
For what it's worth, grapheneos allows you to control this permission.
reply
lolpython 2 hours ago
iOS too
reply