davesteele / gnome-gmail

Integrate GMail into the Linux Desktop
https://davesteele.github.io/gnome-gmail/
GNU General Public License v2.0
50 stars 13 forks source link

Security issue #84

Closed uzakov closed 12 months ago

uzakov commented 4 years ago

Following the email conversation with David I am raising this security issue as agreed (or some might say a feature/expected behavior)

Summary By using the "mailto?attach=..." parameter, a website can make GNOME Gmail attach local files to an email message without showing a warning to the user, additionally when user writes an email they can't see that there is an attachment on some systems. Please see test.gif for a demonstration.

To summarize it is an analog of CVE-2020-11879 in GNOME Evolution KDE KMail (CVE-2020-11880), IBM/HCL Notes (CVE-2020-4089), and Pegasus Mail. https://twitter.com/jensvoid/status/1295357952480751616 Jens originally found this type of issue in email clients. As Jens wrote in the bugzilla report 613425 I quote: "This is arguable a dangerous feature because it allows an attacker to exfiltrate arbitrary files on disk (and also email from the victim's IMAP account), if the victim sends an email based on attacker controlled mailto input and misses the attachment being added."

How to reproduce 1) Have GNOME Gmail client installed on Ubuntu and choose GNOME GMail and Chrome as default browsers (I tested on Ubuntu 20.04 and 18.04.4 with latest stable Chrome) 2) Copy Tux.png to /tmp directory 3) Open test.html 4) Click "Send email" 5) In the GNOME Gmail fill the "To" and "Subject" fields 6) Click send

test test.html

<html>
<body>
<p>POC test</p>
<p><a href="mailto:alikhan@uzakov.io?attach=/tmp/Tux.png">Send email</a></p>
</body>
</html>

Tux.png https://en.wikipedia.org/wiki/File:Tux.png Additional information On Ubuntu 18.04.4 with Chrome version 83.0.4103.116 attachment isn't shown, as you can see in demo above On Ubuntu 20.04 with the latest stable Chrome attachment is shown latestUbuntu