1638
Be careful. (feddit.org)
submitted 1 month ago by 101@feddit.org to c/technology@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] Kethal@lemmy.world 200 points 1 month ago* (last edited 1 month ago)

It seemed odd to me that a Web site could write to or read from the clipboard without the user approving it. That would be a pretty obvious security and privacy issue. From what I gather, on Chrome sites can write to the clipboard without approval, but they need approval to read. ~~On Firefox and others any access requires permission. Thus this exploit seems limited to Chrome users.~~

@SkaveRat pointed out that it doesn't require permission, only interaction. So likely there's a button that's clicked that writes to the clipboard, and most browsers are susceptible to this.

[-] SkaveRat@discuss.tchncs.de 177 points 1 month ago

not when there was a user intent like clicking a button.

For example in this screenshot, it's likely that there's only the "verify I'm human" button first, you click it, the steps pop up, and at the same time the command ist copied into your clipboard

[-] lando55@lemmy.world 22 points 1 month ago* (last edited 1 month ago)

Why isn't the default behavior for browsers to not allow access to the clipboard? Similar to how it prompts you for access to camera/microphone

Edit: On a per-site basis, like if you use the Zoom website it asks you for access to the webcam, would something like this work for clipboard as well or would it break stuff?

[-] madcaesar@lemmy.world 11 points 1 month ago

The browser can't access your clipboard contents without permission, but it can place text into the clipboard.

The problem is people the talking the copied text and pasting it into the command prompt.

[-] lando55@lemmy.world 3 points 1 month ago

Yeah that's what I'm curious about; I'm used to copying code snippets or codes from websites by clicking a button (presumably through some browser API?), but am just now realizing that this in itself has security implications.

Using noscript or some such JS blocker would prevent this but break a lot of other things in the process. That's why I'm wondering why the API isn't locked down via some user prompt.

[-] zaemz@lemmy.world 3 points 1 month ago

In Firefox, you can disable the clipboard events. I've done this for the rare case of me copy+pasting a password and forgetting to clear the clipboard after.

On Android, I've noticed that it's possible for apps to read from the clipboard, to read OTP tokens for example. Since I noticed that a while back, I've always been wary of the clipboard on any device I've used.

[-] dan@upvote.au 2 points 1 month ago

but it can place text into the clipboard.

Only as the result of a user interaction, for example by pressing a button.

[-] T156@lemmy.world 1 points 1 month ago

From the Browser's viewpoint, would there be any difference if the webpage has a JS button to put something in the clipboard, or it having code running in the background that puts things into the clipboard at page load?

It's not like there's that much of a difference, as far as the Browser is concerned.

[-] dan@upvote.au 3 points 1 month ago

would there be any difference if the webpage has a JS button to put something in the clipboard, or it having code running in the background that puts things into the clipboard at page load?

Clicking a button shows user intent, whereas a page load doesn't. No user expects loading a page to overwrite their clipboard, but every user that clicks a "Copy to Clipboard" button does expect it.

load more comments (5 replies)
load more comments (7 replies)
load more comments (8 replies)
this post was submitted on 14 Sep 2024
1638 points (99.0% liked)

Technology

59148 readers
2085 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS