A researcher found numerous security flaws in the WhatsApp Desktop platform for both Windows and macOS. The vulnerabilities could allow an attacker access to the local file system.
WhatsApp For Desktop Flaws Discovered
Security researcher Gal Weizman from PerimeterX has discovered numerous security flaws in the WhatsApp Desktop Platform. As revealed in his report, these vulnerabilities could allow an adversary to gain access to the local file system.
In brief, when he started testing WhatsApp, he found two vulnerabilities that affected all major WhatsApp platforms. That is, WhatsApp for Android, iOS, Mac, Windows, and web versions. These vulnerabilities were not difficult to exploit but certainly had a malicious impact.
One of these was a simple alteration of text messages via WhatsApp Web by altering one line of code. Whereas, the other vulnerability allowed altering banners of the links shared in WhatsApp conversations. Such an alteration could allow an adversary to redirect users to malicious links by showing them false banners and misleading messages with them.
The researcher could continue the exploitation of the bugs from the simple open-redirects to achieve persistent XSS whilst bypassing the WhatsApp Content Security Policy (CSP) and, further, to achieve read access to the local file system.
It was all possible since WhatsApp was not running on the latest version of Electron – a Chromium-based application that facilitates in building native apps. Since the XSS existed in the older Chromium versions, the older Electron versions also became vulnerable to such attacks. As stated by the researcher,
If WhatsApp would have updated their Electron web application from 4.1.4 to the latest which was 7.x.x at the time this vulnerability was found(!) – this XSS would never have existed!
Such exploitation also had the potential for remote code execution.
Precise details about the exploitation are available in his article.
Facebook Patched The Vulnerabilities
Facebook has also confirmed the existence of these vulnerabilities (CVE-2019-18426) in the WhatsApp Desktop platform. As stated in their advisory,
A vulnerability in WhatsApp Desktop when paired with WhatsApp for iPhone allows cross-site scripting and local file reading. Exploiting the vulnerability requires the victim to click a link preview from a specially crafted text message.
Facebook confirmed that the vulnerability affected “WhatsApp Desktop prior to v0.3.9309 paired with WhatsApp for iPhone versions prior to 2.20.10”.
Let us know your thoughts in the comments.